diff options
| author | Chris Lattner <sabre@nondot.org> | 2004-01-14 03:38:37 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2004-01-14 03:38:37 +0000 |
| commit | fa76183e8e28985dfd17b1d6291c939dab4cbe1d (patch) | |
| tree | 5898187ef916460b4a0b844abf0ddee8a8bf1879 /tools/bugpoint/Miscompilation.cpp | |
| parent | 277bafbff7384f282c4a409863c220536d6f09b6 (diff) | |
finegrainify namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10839 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint/Miscompilation.cpp')
| -rw-r--r-- | tools/bugpoint/Miscompilation.cpp | 53 |
1 files changed, 28 insertions, 25 deletions
diff --git a/tools/bugpoint/Miscompilation.cpp b/tools/bugpoint/Miscompilation.cpp index f9d5fdbb79..715860839d 100644 --- a/tools/bugpoint/Miscompilation.cpp +++ b/tools/bugpoint/Miscompilation.cpp @@ -18,17 +18,19 @@ #include "llvm/Transforms/Utils/Cloning.h" #include "llvm/Transforms/Utils/Linker.h" #include "Support/FileUtilities.h" +using namespace llvm; namespace llvm { -class ReduceMiscompilingPasses : public ListReducer<const PassInfo*> { - BugDriver &BD; -public: - ReduceMiscompilingPasses(BugDriver &bd) : BD(bd) {} - - virtual TestResult doTest(std::vector<const PassInfo*> &Prefix, - std::vector<const PassInfo*> &Suffix); -}; + class ReduceMiscompilingPasses : public ListReducer<const PassInfo*> { + BugDriver &BD; + public: + ReduceMiscompilingPasses(BugDriver &bd) : BD(bd) {} + + virtual TestResult doTest(std::vector<const PassInfo*> &Prefix, + std::vector<const PassInfo*> &Suffix); + }; +} ReduceMiscompilingPasses::TestResult ReduceMiscompilingPasses::doTest(std::vector<const PassInfo*> &Prefix, @@ -122,22 +124,24 @@ ReduceMiscompilingPasses::doTest(std::vector<const PassInfo*> &Prefix, return NoFailure; } -class ReduceMiscompilingFunctions : public ListReducer<Function*> { - BugDriver &BD; -public: - ReduceMiscompilingFunctions(BugDriver &bd) : BD(bd) {} - - virtual TestResult doTest(std::vector<Function*> &Prefix, - std::vector<Function*> &Suffix) { - if (!Suffix.empty() && TestFuncs(Suffix, false)) - return KeepSuffix; - if (!Prefix.empty() && TestFuncs(Prefix, false)) - return KeepPrefix; - return NoFailure; - } - - bool TestFuncs(const std::vector<Function*> &Prefix, bool EmitBytecode); -}; +namespace llvm { + class ReduceMiscompilingFunctions : public ListReducer<Function*> { + BugDriver &BD; + public: + ReduceMiscompilingFunctions(BugDriver &bd) : BD(bd) {} + + virtual TestResult doTest(std::vector<Function*> &Prefix, + std::vector<Function*> &Suffix) { + if (!Suffix.empty() && TestFuncs(Suffix, false)) + return KeepSuffix; + if (!Prefix.empty() && TestFuncs(Prefix, false)) + return KeepPrefix; + return NoFailure; + } + + bool TestFuncs(const std::vector<Function*> &Prefix, bool EmitBytecode); + }; +} bool ReduceMiscompilingFunctions::TestFuncs(const std::vector<Function*> &Funcs, bool EmitBytecode) { @@ -315,4 +319,3 @@ bool BugDriver::debugMiscompilation() { return false; } -} // End llvm namespace |
