[llvm-commits] CVS: llvm/lib/Linker/LinkModules.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon Jan 23 15:08:49 PST 2006



Changes in directory llvm/lib/Linker:

LinkModules.cpp updated: 1.109 -> 1.110
---
Log message:

Add support for linking inline asm


---
Diffs of the changes:  (+7 -0)

 LinkModules.cpp |    7 +++++++
 1 files changed, 7 insertions(+)


Index: llvm/lib/Linker/LinkModules.cpp
diff -u llvm/lib/Linker/LinkModules.cpp:1.109 llvm/lib/Linker/LinkModules.cpp:1.110
--- llvm/lib/Linker/LinkModules.cpp:1.109	Thu Jan 19 17:15:58 2006
+++ llvm/lib/Linker/LinkModules.cpp	Mon Jan 23 17:08:37 2006
@@ -833,6 +833,13 @@
       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.






More information about the llvm-commits mailing list