A couple of minor cleanups: don't forward declare private classes, put private
authorChris Lattner <sabre@nondot.org>
Wed, 18 Feb 2004 21:29:46 +0000 (21:29 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 18 Feb 2004 21:29:46 +0000 (21:29 +0000)
classes in an anon namespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11604 91177308-0d34-0410-b5e6-96231b3b80d8

tools/bugpoint/BugDriver.h
tools/bugpoint/CrashDebugger.cpp
tools/bugpoint/Miscompilation.cpp

index a5f1e3f356382420e9059b1bd0de8195f93bfe90..38630a6fedd97bd2e7228422ebeb9abd26865866 100644 (file)
@@ -30,8 +30,6 @@ class Instruction;
 class DebugCrashes;
 class ReduceMiscompilingPasses;
 class ReduceMiscompilingFunctions;
-class ReduceCrashingFunctions;
-class ReduceCrashingBlocks;
 
 class CBE;
 class GCC;
index 3a64e94eba4b2d1184c5292576803b94e838f45b..19d62b4ea2fca0f72178013949bcc661730bba94 100644 (file)
@@ -144,7 +144,7 @@ bool ReduceCrashingFunctions::TestFuncs(std::vector<Function*> &Funcs) {
 }
 
 
-namespace llvm {
+namespace {
   /// ReduceCrashingBlocks reducer - This works by setting the terminators of
   /// all terminators except the specified basic blocks to a 'ret' instruction,
   /// then running the simplify-cfg pass.  This has the effect of chopping up
index 0884ad97d1dd78ae0d72ee519c2023e2ec2cc997..98e299d76d82ddce5d5677e024ddf90ddf2ab21d 100644 (file)
@@ -159,7 +159,7 @@ bool ReduceMiscompilingFunctions::TestFuncs(const std::vector<Function*> &Funcs,
   }
 
   // First step: clone the module for the two halves of the program we want.
-  Module *ToOptimize = CloneModule(BD.Program);
+  Module *ToOptimize = CloneModule(BD.getProgram());
 
   // Second step: Make sure functions & globals are all external so that linkage
   // between the two modules will work.
@@ -231,7 +231,7 @@ bool ReduceMiscompilingFunctions::TestFuncs(const std::vector<Function*> &Funcs,
   if (!EmitBytecode)
     std::cout << "done.\n";
 
-  delete BD.Program;   // Delete the old "ToOptimize" module
+  delete BD.getProgram();   // Delete the old "ToOptimize" module
   BD.Program = BD.ParseInputFile(BytecodeResult);
 
   if (EmitBytecode) {
@@ -270,7 +270,7 @@ bool ReduceMiscompilingFunctions::TestFuncs(const std::vector<Function*> &Funcs,
   // output, then 'Funcs' are being misoptimized!
   bool Broken = BD.diffProgram();
 
-  delete BD.Program;  // Delete the hacked up program
+  delete BD.Program;         // Delete the hacked up program
   BD.Program = OldProgram;   // Restore the original
 
   std::cout << (Broken ? " nope.\n" : " yup.\n");