summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint/CrashDebugger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/bugpoint/CrashDebugger.cpp')
-rw-r--r--llvm/tools/bugpoint/CrashDebugger.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/tools/bugpoint/CrashDebugger.cpp b/llvm/tools/bugpoint/CrashDebugger.cpp
index 1bfcc87e06e..631a58455c5 100644
--- a/llvm/tools/bugpoint/CrashDebugger.cpp
+++ b/llvm/tools/bugpoint/CrashDebugger.cpp
@@ -162,7 +162,7 @@ ReduceCrashingGlobalVariables::TestGlobalVariables(
// playing with...
for (GlobalVariable &I : M->globals())
if (I.hasInitializer() && !GVSet.count(&I)) {
- I.setInitializer(nullptr);
+ DeleteGlobalInitializer(&I);
I.setLinkage(GlobalValue::ExternalLinkage);
}
@@ -664,7 +664,7 @@ static bool DebugACrash(BugDriver &BD,
for (Module::global_iterator I = M->global_begin(), E = M->global_end();
I != E; ++I)
if (I->hasInitializer()) {
- I->setInitializer(nullptr);
+ DeleteGlobalInitializer(&*I);
I->setLinkage(GlobalValue::ExternalLinkage);
DeletedInit = true;
}
OpenPOWER on IntegriCloud