diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2016-11-14 23:18:38 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2016-11-14 23:18:38 +0000 |
commit | 3cb86272fc4c2c42cce63a978879a4299a8c7bd5 (patch) | |
tree | 411efb41bf7583535ce2174ecae06015b1b0cec1 /llvm/lib/Linker | |
parent | 8f21c0e50acb2d81deff8ac8380268f58fb3a77b (diff) | |
download | bcm5719-llvm-3cb86272fc4c2c42cce63a978879a4299a8c7bd5.tar.gz bcm5719-llvm-3cb86272fc4c2c42cce63a978879a4299a8c7bd5.zip |
Linker: Remove unnecessary call to copyMetadata in IRLinker::linkGlobalVariable.
This was causing us to create duplicate metadata on global variables.
Debug info test case by Adrian Prantl, additional test cases by me.
Fixes PR31012.
Differential Revision: https://reviews.llvm.org/D26622
llvm-svn: 286905
Diffstat (limited to 'llvm/lib/Linker')
-rw-r--r-- | llvm/lib/Linker/IRMover.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/llvm/lib/Linker/IRMover.cpp b/llvm/lib/Linker/IRMover.cpp index 4c51292115c..18389143124 100644 --- a/llvm/lib/Linker/IRMover.cpp +++ b/llvm/lib/Linker/IRMover.cpp @@ -950,8 +950,6 @@ Expected<Constant *> IRLinker::linkGlobalValueProto(GlobalValue *SGV, /// Update the initializers in the Dest module now that all globals that may be /// referenced are in Dest. void IRLinker::linkGlobalVariable(GlobalVariable &Dst, GlobalVariable &Src) { - Dst.copyMetadata(&Src, 0); - // Figure out what the initializer looks like in the dest module. Mapper.scheduleMapGlobalInitializer(Dst, *Src.getInitializer()); } |