diff options
author | Martell Malone <martellmalone@gmail.com> | 2017-11-29 06:25:13 +0000 |
---|---|---|
committer | Martell Malone <martellmalone@gmail.com> | 2017-11-29 06:25:13 +0000 |
commit | 390cfcb0b1df73b7b2a13e02f63dff46e8fe09cd (patch) | |
tree | 14bb962e9997aafccb817476363088840ff91266 /clang/lib/Driver/ToolChains/FreeBSD.cpp | |
parent | 1c3b62282089e57480e80e55dd133f573f48dc30 (diff) | |
download | bcm5719-llvm-390cfcb0b1df73b7b2a13e02f63dff46e8fe09cd.tar.gz bcm5719-llvm-390cfcb0b1df73b7b2a13e02f63dff46e8fe09cd.zip |
Toolchain: Normalize dwarf, sjlj and seh eh
adds -fseh-exceptions and -fdwarf-exceptions flags
clang will check if the user has specified an exception model flag,
in the absense of specifying the exception model clang will then check
the driver default and append the model flag for that target to cc1
clang cc1 assumes dwarf is the default if none is passed
and -fno-exceptions has a higher priority then specifying the model
move __SEH__ macro definitions out of Targets into InitPreprocessor
behind the -fseh-exceptions flag
move __ARM_DWARF_EH__ macrodefinitions out of verious targets and into
InitPreprocessor behind the -fdwarf-exceptions flag and arm|thumb check
remove unused USESEHExceptions from the MinGW Driver
fold USESjLjExceptions into a new GetExceptionModel function that
gives the toolchain classes more flexibility with eh models
Reviewers: rnk, mstorsjo
Differential Revision: https://reviews.llvm.org/D39673
llvm-svn: 319294
Diffstat (limited to 'clang/lib/Driver/ToolChains/FreeBSD.cpp')
-rw-r--r-- | clang/lib/Driver/ToolChains/FreeBSD.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/Driver/ToolChains/FreeBSD.cpp b/clang/lib/Driver/ToolChains/FreeBSD.cpp index 2f066cf0cc8..025acf15117 100644 --- a/clang/lib/Driver/ToolChains/FreeBSD.cpp +++ b/clang/lib/Driver/ToolChains/FreeBSD.cpp @@ -359,17 +359,17 @@ Tool *FreeBSD::buildAssembler() const { Tool *FreeBSD::buildLinker() const { return new tools::freebsd::Linker(*this); } -bool FreeBSD::UseSjLjExceptions(const ArgList &Args) const { +llvm::ExceptionHandling FreeBSD::GetExceptionModel(const ArgList &Args) const { // FreeBSD uses SjLj exceptions on ARM oabi. switch (getTriple().getEnvironment()) { + default: + if (getTriple().getArch() == llvm::Triple::arm || + getTriple().getArch() == llvm::Triple::thumb) + return llvm::ExceptionHandling::SjLj; case llvm::Triple::GNUEABIHF: case llvm::Triple::GNUEABI: case llvm::Triple::EABI: - return false; - - default: - return (getTriple().getArch() == llvm::Triple::arm || - getTriple().getArch() == llvm::Triple::thumb); + return llvm::ExceptionHandling::None; } } |