mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 02:33:33 +00:00
nothing opt uses can throw, remove the try block and -fexceptions when
building opt. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84816 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d331cb3fde
commit
61db1a1b6a
@ -1,4 +1,3 @@
|
||||
set(LLVM_REQUIRES_EH 1)
|
||||
set(LLVM_LINK_COMPONENTS bitreader asmparser bitwriter instrumentation scalaropts ipo)
|
||||
|
||||
add_llvm_tool(opt
|
||||
|
@ -8,7 +8,6 @@
|
||||
##===----------------------------------------------------------------------===##
|
||||
LEVEL = ../..
|
||||
TOOLNAME = opt
|
||||
REQUIRES_EH := 1
|
||||
|
||||
LINK_COMPONENTS := bitreader bitwriter asmparser instrumentation scalaropts ipo
|
||||
|
||||
|
@ -346,7 +346,7 @@ void AddStandardLinkPasses(PassManager &PM) {
|
||||
int main(int argc, char **argv) {
|
||||
llvm_shutdown_obj X; // Call llvm_shutdown() on exit.
|
||||
LLVMContext &Context = getGlobalContext();
|
||||
try {
|
||||
|
||||
cl::ParseCommandLineOptions(argc, argv,
|
||||
"llvm .bc -> .bc modular optimizer and analysis printer\n");
|
||||
sys::PrintStackTraceOnErrorSignal();
|
||||
@ -494,17 +494,14 @@ int main(int argc, char **argv) {
|
||||
StandardLinkOpts = false;
|
||||
}
|
||||
|
||||
if (OptLevelO1) {
|
||||
if (OptLevelO1)
|
||||
AddOptimizationPasses(Passes, *FPasses, 1);
|
||||
}
|
||||
|
||||
if (OptLevelO2) {
|
||||
if (OptLevelO2)
|
||||
AddOptimizationPasses(Passes, *FPasses, 2);
|
||||
}
|
||||
|
||||
if (OptLevelO3) {
|
||||
if (OptLevelO3)
|
||||
AddOptimizationPasses(Passes, *FPasses, 3);
|
||||
}
|
||||
|
||||
if (OptLevelO1 || OptLevelO2 || OptLevelO3) {
|
||||
FPasses->doInitialization();
|
||||
@ -532,12 +529,4 @@ int main(int argc, char **argv) {
|
||||
if (Out != &outs())
|
||||
delete Out;
|
||||
return 0;
|
||||
|
||||
} catch (const std::string& msg) {
|
||||
errs() << argv[0] << ": " << msg << "\n";
|
||||
} catch (...) {
|
||||
errs() << argv[0] << ": Unexpected unknown exception occurred.\n";
|
||||
}
|
||||
llvm_shutdown();
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user