diff options
author | Chris Lattner <sabre@nondot.org> | 2006-01-23 23:08:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-01-23 23:08:37 +0000 |
commit | e1b2e14f92e8e9da1eb4854511a881cf9c22af3c (patch) | |
tree | 6c75104d6417cb975577e2e8ec403e6f578d869d /lib/Linker/LinkModules.cpp | |
parent | 9771aeafca2875c8ac6ef19ab8dd5b432ee94677 (diff) |
Add support for linking inline asm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25560 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Linker/LinkModules.cpp')
-rw-r--r-- | lib/Linker/LinkModules.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index 8295418cd7..482a63abdc 100644 --- a/lib/Linker/LinkModules.cpp +++ b/lib/Linker/LinkModules.cpp @@ -833,6 +833,13 @@ Linker::LinkModules(Module *Dest, Module *Src, std::string *ErrorMsg) { Dest->getTargetTriple() != Src->getTargetTriple()) std::cerr << "WARNING: Linking two modules of different target triples!\n"; + if (!Src->getInlineAsm().empty()) { + if (Dest->getInlineAsm().empty()) + Dest->setInlineAsm(Src->getInlineAsm()); + else + Dest->setInlineAsm(Dest->getInlineAsm()+"\n"+Src->getInlineAsm()); + } + // Update the destination module's dependent libraries list with the libraries // from the source module. There's no opportunity for duplicates here as the // Module ensures that duplicate insertions are discarded. |