summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorJim Laskey <jlaskey@mac.com>2007-01-29 20:48:32 +0000
committerJim Laskey <jlaskey@mac.com>2007-01-29 20:48:32 +0000
commitd1154860a4de51b9face644d146c28cba3ac7e46 (patch)
treed751c43c600002e209a3dcad9f89f8c5461b3171 /llvm
parent5a4a315aedab20040357320214ed2234f6f752eb (diff)
downloadbcm5719-llvm-d1154860a4de51b9face644d146c28cba3ac7e46.tar.gz
bcm5719-llvm-d1154860a4de51b9face644d146c28cba3ac7e46.zip
Flag to control exception handling.
llvm-svn: 33628
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/Target/TargetOptions.h5
-rw-r--r--llvm/lib/CodeGen/DwarfWriter.cpp5
-rw-r--r--llvm/lib/Target/TargetMachine.cpp6
3 files changed, 14 insertions, 2 deletions
diff --git a/llvm/include/llvm/Target/TargetOptions.h b/llvm/include/llvm/Target/TargetOptions.h
index 6bfe005c156..fcf2aa15bb1 100644
--- a/llvm/include/llvm/Target/TargetOptions.h
+++ b/llvm/include/llvm/Target/TargetOptions.h
@@ -59,6 +59,11 @@ namespace llvm {
/// .bss section. This flag disables such behaviour (necessary, e.g. for
/// crt*.o compiling).
extern bool NoZerosInBSS;
+
+ /// ExceptionHandling - This flag indicates that exception information should
+ /// be emitted.
+ extern bool ExceptionHandling;
+
} // End llvm namespace
#endif
diff --git a/llvm/lib/CodeGen/DwarfWriter.cpp b/llvm/lib/CodeGen/DwarfWriter.cpp
index 62d9f7c74f2..2b9cf74f88a 100644
--- a/llvm/lib/CodeGen/DwarfWriter.cpp
+++ b/llvm/lib/CodeGen/DwarfWriter.cpp
@@ -29,8 +29,9 @@
#include "llvm/Target/TargetAsmInfo.h"
#include "llvm/Target/MRegisterInfo.h"
#include "llvm/Target/TargetData.h"
-#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetFrameInfo.h"
+#include "llvm/Target/TargetMachine.h"
+#include "llvm/Target/TargetOptions.h"
#include <ostream>
#include <string>
using namespace llvm;
@@ -2675,7 +2676,7 @@ public:
/// manager has created it. Set by the target AsmPrinter.
void SetModuleInfo(MachineModuleInfo *mmi) {
// Make sure initial declarations are made.
- if (!MMI && TAI->getSupportsExceptionHandling()) {
+ if (!MMI && ExceptionHandling && TAI->getSupportsExceptionHandling()) {
MMI = mmi;
shouldEmit = true;
}
diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp
index f6b3fd09f0b..842865391dd 100644
--- a/llvm/lib/Target/TargetMachine.cpp
+++ b/llvm/lib/Target/TargetMachine.cpp
@@ -29,6 +29,7 @@ namespace llvm {
bool FiniteOnlyFPMathOption;
bool UseSoftFloat;
bool NoZerosInBSS;
+ bool ExceptionHandling;
Reloc::Model RelocationModel;
CodeModel::Model CMModel;
}
@@ -67,6 +68,11 @@ namespace {
cl::desc("Don't place zero-initialized symbols into bss section"),
cl::location(NoZerosInBSS),
cl::init(false));
+ cl::opt<bool, true>
+ EnableExceptionHandling("exception-handling",
+ cl::desc("Exception handling should be emitted."),
+ cl::location(ExceptionHandling),
+ cl::init(false));
cl::opt<llvm::Reloc::Model, true>
DefRelocationModel(
OpenPOWER on IntegriCloud