//
// The LLVM Compiler Infrastructure
//
-// This file was developed by the LLVM research group and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
#include "llvm/PassManager.h"
#include "llvm/ValueSymbolTable.h"
#include "llvm/Analysis/Verifier.h"
-#include "llvm/Bytecode/Writer.h"
#include "llvm/Support/CFG.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Utils/Cloning.h"
BD.Program = ParseInputFile(PrefixOutput.toString());
if (BD.Program == 0) {
- std::cerr << BD.getToolName() << ": Error reading bytecode file '"
+ std::cerr << BD.getToolName() << ": Error reading bitcode file '"
<< PrefixOutput << "'!\n";
exit(1);
}
//if main isn't present, claim there is no problem
if (KeepMain && find(Funcs.begin(), Funcs.end(),
- BD.getProgram()->getMainFunction()) == Funcs.end())
+ BD.getProgram()->getFunction("main")) == Funcs.end())
return false;
// Clone the program to try hacking it apart...
ReduceCrashingGlobalVariables(BD, TestFn).reduceList(GVs);
if (GVs.size() < OldSize)
- BD.EmitProgressBytecode("reduced-global-variables");
+ BD.EmitProgressBitcode("reduced-global-variables");
}
}
}
ReduceCrashingFunctions(BD, TestFn).reduceList(Functions);
if (Functions.size() < OldSize)
- BD.EmitProgressBytecode("reduced-function");
+ BD.EmitProgressBitcode("reduced-function");
}
// Attempt to delete entire basic blocks at a time to speed up
}
}
- BD.EmitProgressBytecode("reduced-simplified");
+ BD.EmitProgressBitcode("reduced-simplified");
return false;
}
<< (PassesToRun.size() == 1 ? ": " : "es: ")
<< getPassesString(PassesToRun) << '\n';
- EmitProgressBytecode(ID);
+ EmitProgressBitcode(ID);
return DebugACrash(*this, TestForOptimizerCrash);
}