//===----------------------------------------------------------------------===//
#include "BugDriver.h"
-#include "SystemUtils.h"
#include "ListReducer.h"
-#include "llvm/Pass.h"
#include "llvm/Module.h"
+#include "llvm/Pass.h"
#include "llvm/Transforms/Utils/Cloning.h"
#include "llvm/Transforms/Utils/Linker.h"
+#include "Support/FileUtilities.h"
class ReduceMiscompilingPasses : public ListReducer<const PassInfo*> {
BugDriver &BD;
virtual TestResult doTest(std::vector<Function*> &Prefix,
std::vector<Function*> &Suffix) {
- if (TestFuncs(Suffix, false))
+ if (!Suffix.empty() && TestFuncs(Suffix, false))
return KeepSuffix;
if (!Prefix.empty() && TestFuncs(Prefix, false))
return KeepPrefix;
/// input.
///
bool BugDriver::debugMiscompilation() {
-
- if (diffProgram()) {
- std::cout << "\n*** Input program does not match reference diff!\n"
- << " Must be problem with input source!\n";
- return false; // Problem found
- }
-
// Make sure something was miscompiled...
if (!ReduceMiscompilingPasses(*this).reduceList(PassesToRun)) {
std::cerr << "*** Optimized program matches reference output! No problem "