[PATCH] D101463: [clang] Make libBasic not depend on MC

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 28 07:59:15 PDT 2021


thakis created this revision.
thakis added a reviewer: hans.
Herald added subscribers: dexonsmith, dang, mgorny.
Herald added a reviewer: aaron.ballman.
thakis requested review of this revision.
Herald added subscribers: llvm-commits, aheejin.
Herald added a project: LLVM.

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.


https://reviews.llvm.org/D101463

Files:
  clang/include/clang/Basic/DiagnosticFrontendKinds.td
  clang/include/clang/Basic/LangOptions.h
  clang/include/clang/Basic/TargetInfo.h
  clang/include/clang/Driver/Options.td
  clang/include/clang/Sema/Sema.h
  clang/lib/Basic/CMakeLists.txt
  clang/lib/Basic/Targets/OSTargets.h
  clang/lib/Frontend/CompilerInvocation.cpp
  clang/lib/Sema/CMakeLists.txt
  clang/lib/Sema/SemaAttr.cpp
  clang/lib/Sema/SemaDeclAttr.cpp
  llvm/utils/gn/secondary/clang/lib/Basic/BUILD.gn
  llvm/utils/gn/secondary/clang/lib/Sema/BUILD.gn
  llvm/utils/gn/secondary/clang/tools/clang-format/BUILD.gn

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101463.341210.patch
Type: text/x-patch
Size: 11425 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210428/110556bd/attachment.bin>


More information about the llvm-commits mailing list