diff options
author | Jan Voung <jvoung@chromium.org> | 2013-04-26 13:16:19 -0700 |
---|---|---|
committer | Jan Voung <jvoung@chromium.org> | 2013-04-26 13:16:19 -0700 |
commit | 7564114a66c3d5401f5b63c6a940e7c2c2c329b6 (patch) | |
tree | 62435fdcbc45cb76a22bb42564dc3d417e403136 /lib/Linker | |
parent | 5712db994c8a4abb8c2512fb2900650f8335af66 (diff) |
Remove a localmod that was a variation of a fix for debug metadata.
This was fixed upstream a different way:
"""
Bob Wilson 2013-03-18 23:15:31 CDT
Manman says this was fixed in r173946.
Comment 10 Bob Wilson 2013-03-18 23:32:21 CDT
That change was reverted and replaced by r174093.
"""
BUG=https://code.google.com/p/nativeclient/issues/detail?id=2809
TEST=./scons bitcode=1 run_dwarf_local_var_objdump_test
R=eliben@chromium.org
Review URL: https://codereview.chromium.org/13868020
Diffstat (limited to 'lib/Linker')
-rw-r--r-- | lib/Linker/LinkModules.cpp | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index 26061c280d..2fdb8cc9cd 100644 --- a/lib/Linker/LinkModules.cpp +++ b/lib/Linker/LinkModules.cpp @@ -927,19 +927,6 @@ void ModuleLinker::linkFunctionBody(Function *Dst, Function *Src) { ValueMap[I] = DI; } - // @LOCALMOD-BEGIN - // Local patch for http://llvm.org/bugs/show_bug.cgi?id=11112 - // and http://llvm.org/bugs/show_bug.cgi?id=10887 - // Create an identity mapping for instructions so that alloca instructions - // do not get dropped and related debug info isn't lost. E.g., prevent - // call @llvm.dbg.declare(metadata !{i32 * %local_var}, ...) - // from becoming - // call @llvm.dbg.declare(null, ...) - for (Function::iterator BB = Src->begin(), BE = Src->end(); BB != BE; ++BB) - for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) - ValueMap[I] = I; - // @LOCALMOD-END - if (Mode == Linker::DestroySource) { // Splice the body of the source function into the dest function. Dst->getBasicBlockList().splice(Dst->end(), Src->getBasicBlockList()); @@ -958,13 +945,6 @@ void ModuleLinker::linkFunctionBody(Function *Dst, Function *Src) { CloneFunctionInto(Dst, Src, ValueMap, false, Returns, "", NULL, &TypeMap); } - // @LOCALMOD-BEGIN - // There is no need for the identity mapping anymore. - for (Function::iterator BB = Src->begin(), BE = Src->end(); BB != BE; ++BB) - for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) - ValueMap.erase(I); - // @LOCALMOD-END - // There is no need to map the arguments anymore. for (Function::arg_iterator I = Src->arg_begin(), E = Src->arg_end(); I != E; ++I) @@ -1195,7 +1175,7 @@ bool ModuleLinker::run() { for (Module::lib_iterator SI = SrcM->lib_begin(), SE = SrcM->lib_end(); SI != SE; ++SI) DstM->addLibrary(*SI); - + // If the source library's module id is in the dependent library list of the // destination library, remove it since that module is now linked in. StringRef ModuleId = SrcM->getModuleIdentifier(); |