summaryrefslogtreecommitdiffstats
path: root/llvm/tools/gold/gold-plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/gold/gold-plugin.cpp')
-rw-r--r--llvm/tools/gold/gold-plugin.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp
index 16e5045bcb9..93ce3bc0f44 100644
--- a/llvm/tools/gold/gold-plugin.cpp
+++ b/llvm/tools/gold/gold-plugin.cpp
@@ -20,6 +20,7 @@
#include "llvm/Bitcode/ReaderWriter.h"
#include "llvm/CodeGen/Analysis.h"
#include "llvm/CodeGen/CommandFlags.h"
+#include "llvm/IR/AutoUpgrade.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/DiagnosticPrinter.h"
@@ -602,11 +603,8 @@ getModuleForFile(LLVMContext &Context, claimed_file &F,
Module &M = Obj.getModule();
- // Fixme (pr23045). We would like to upgrade the metadata with something like
- // Result->materializeMetadata();
- // UpgradeDebugInfo(*Result);
- // but that fails to drop old debug info from function bodies.
- M.materializeAllPermanently();
+ M.materializeMetadata();
+ UpgradeDebugInfo(M);
SmallPtrSet<GlobalValue *, 8> Used;
collectUsedGlobalVariables(M, Used, /*CompilerUsed*/ false);
OpenPOWER on IntegriCloud