diff options
author | Nico Weber <thakis@chromium.org> | 2021-04-20 10:58:19 -0400 |
---|---|---|
committer | Nico Weber <thakis@chromium.org> | 2021-04-28 12:16:22 -0400 |
commit | 671f0e2e189c561512511331d95de382e2d6d15d (patch) | |
tree | 339db1a366a2430a79952421b62bccbbdb096248 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | d16d820c2e6400aa2242efcedbfa824fbfa2fc09 (diff) | |
download | llvm-671f0e2e189c561512511331d95de382e2d6d15d.zip llvm-671f0e2e189c561512511331d95de382e2d6d15d.tar.gz llvm-671f0e2e189c561512511331d95de382e2d6d15d.tar.bz2 |
[clang] Make libBasic not depend on MC
Reduces numbers of files built for clang-format from 575 to 449.
Requires two small changes:
1. Don't use llvm::ExceptionHandling in LangOptions. This isn't
even quite the right type since we don't use all of its values.
Tweaks the changes made in:
- https://reviews.llvm.org/D93215
- https://reviews.llvm.org/D93216
2. Move section name validation code added (long ago) in commit 30ba67439 out
of libBasic into Sema and base the check on the triple. This is a bit less
OOP-y, but completely in line with what we do in many other places in Sema.
No behavior change.
Differential Revision: https://reviews.llvm.org/D101463
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 36d2fe3..2578c8c 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -463,7 +463,8 @@ static bool FixupInvocation(CompilerInvocation &Invocation, CodeGenOpts.CodeModel = TargetOpts.CodeModel; - if (LangOpts.getExceptionHandling() != llvm::ExceptionHandling::None && + if (LangOpts.getExceptionHandling() != + LangOptions::ExceptionHandlingKind::None && T.isWindowsMSVCEnvironment()) Diags.Report(diag::err_fe_invalid_exception_model) << static_cast<unsigned>(LangOpts.getExceptionHandling()) << T.str(); |