aboutsummaryrefslogtreecommitdiff
path: root/Driver/clang.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-08-11 17:36:14 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-08-11 17:36:14 +0000
commit6379a7a15335e0af543a942efe9cfd514a83dab8 (patch)
treea8636980d6c00dd64e11ac146bbdf6f35d1889fb /Driver/clang.cpp
parent58bf6101062867ca4b3028f9e77e4ae642f09b44 (diff)
Add -fexceptions to Driver
- Maps to LangOptions.Exceptions - Currently always off, should autoselect based on language. Update CodeGen to set unwind attribute on functions definitions based on LangOptions.Exceptions. - Still need to set attributes appropriately on calls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54643 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/clang.cpp')
-rw-r--r--Driver/clang.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index 05befe08c1..c55aa17eb2 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -362,6 +362,17 @@ LaxVectorConversions("flax-vector-conversions",
" with a different number of elements or "
"different element types"));
+// FIXME: This (and all GCC -f options) really come in -f... and
+// -fno-... forms, and additionally support automagic behavior when
+// they are not defined. For example, -fexceptions defaults to on or
+// off depending on the language. We should support this behavior in
+// some form (perhaps just add a facility for distinguishing when an
+// has its default value from when it has been set to its default
+// value).
+static llvm::cl::opt<bool>
+Exceptions("fexceptions",
+ llvm::cl::desc("Enable support for exception handling."));
+
// FIXME: add:
// -ansi
// -trigraphs
@@ -427,6 +438,7 @@ static void InitializeLanguageStandard(LangOptions &Options, LangKind LK) {
Options.Microsoft = MSExtensions;
Options.WritableStrings = WritableStrings;
Options.LaxVectorConversions = LaxVectorConversions;
+ Options.Exceptions = Exceptions;
}
static llvm::cl::opt<bool>