From f913f40be8501738fa4bdcae2015dd196dcbfc50 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 18 Feb 2004 21:29:46 +0000 Subject: [PATCH] A couple of minor cleanups: don't forward declare private classes, put private 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 | 2 -- tools/bugpoint/CrashDebugger.cpp | 2 +- tools/bugpoint/Miscompilation.cpp | 6 +++--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tools/bugpoint/BugDriver.h b/tools/bugpoint/BugDriver.h index a5f1e3f3563..38630a6fedd 100644 --- a/tools/bugpoint/BugDriver.h +++ b/tools/bugpoint/BugDriver.h @@ -30,8 +30,6 @@ class Instruction; class DebugCrashes; class ReduceMiscompilingPasses; class ReduceMiscompilingFunctions; -class ReduceCrashingFunctions; -class ReduceCrashingBlocks; class CBE; class GCC; diff --git a/tools/bugpoint/CrashDebugger.cpp b/tools/bugpoint/CrashDebugger.cpp index 3a64e94eba4..19d62b4ea2f 100644 --- a/tools/bugpoint/CrashDebugger.cpp +++ b/tools/bugpoint/CrashDebugger.cpp @@ -144,7 +144,7 @@ bool ReduceCrashingFunctions::TestFuncs(std::vector &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 diff --git a/tools/bugpoint/Miscompilation.cpp b/tools/bugpoint/Miscompilation.cpp index 0884ad97d1d..98e299d76d8 100644 --- a/tools/bugpoint/Miscompilation.cpp +++ b/tools/bugpoint/Miscompilation.cpp @@ -159,7 +159,7 @@ bool ReduceMiscompilingFunctions::TestFuncs(const std::vector &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 &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 &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");