diff options
Diffstat (limited to 'llvm/lib/Linker')
-rw-r--r-- | llvm/lib/Linker/LinkModules.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp index 6c025d685f3..ebb790201fd 100644 --- a/llvm/lib/Linker/LinkModules.cpp +++ b/llvm/lib/Linker/LinkModules.cpp @@ -1505,11 +1505,16 @@ bool ModuleLinker::run() { if (DoNotLinkFromSource.count(SF)) continue; Function *DF = cast<Function>(ValueMap[SF]); - if (SF->hasPrefixData()) { - // Link in the prefix data. + + // Link in the prefix data. + if (SF->hasPrefixData()) DF->setPrefixData(MapValue( SF->getPrefixData(), ValueMap, RF_None, &TypeMap, &ValMaterializer)); - } + + // Link in the prologue data. + if (SF->hasPrologueData()) + DF->setPrologueData(MapValue( + SF->getPrologueData(), ValueMap, RF_None, &TypeMap, &ValMaterializer)); // Materialize if needed. if (std::error_code EC = SF->materialize()) |