-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);
+ };
+}