Fix the crash debugger to actually bisect globals once it's determined that it
[oota-llvm.git] / tools / bugpoint / CrashDebugger.cpp
index f369d4e5184dfd951e3943719f2c0f8acae9b73f..7daf57c91589f824fc374d83da681ff4abbb979f 100644 (file)
@@ -150,7 +150,7 @@ ReduceCrashingGlobalVariables::TestGlobalVariables(
   // playing with...
   for (Module::global_iterator I = M->global_begin(), E = M->global_end();
        I != E; ++I)
-    if (I->hasInitializer()) {
+    if (I->hasInitializer() && !GVSet.count(I)) {
       I->setInitializer(0);
       I->setLinkage(GlobalValue::ExternalLinkage);
     }