mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-13 14:47:00 +00:00
Add support for linking inline asm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25560 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9771aeafca
commit
e1b2e14f92
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user