diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2008-08-11 17:36:14 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2008-08-11 17:36:14 +0000 |
| commit | fb3043d62708f182b7387924456c2282d374a9ef (patch) | |
| tree | 9fdcbf6f3068d69a02d0a3290bf793fb083ecc52 /clang/Driver/clang.cpp | |
| parent | 48595de6979d6965e1ae6a97ed3cf68d69bfc41d (diff) | |
| download | bcm5719-llvm-fb3043d62708f182b7387924456c2282d374a9ef.tar.gz bcm5719-llvm-fb3043d62708f182b7387924456c2282d374a9ef.zip | |
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.
llvm-svn: 54643
Diffstat (limited to 'clang/Driver/clang.cpp')
| -rw-r--r-- | clang/Driver/clang.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/Driver/clang.cpp b/clang/Driver/clang.cpp index 05befe08c12..c55aa17eb2b 100644 --- a/clang/Driver/clang.cpp +++ b/clang/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> |

