[PATCH] D65562: Move LangStandard*, InputKind::Language to Basic
Rainer Orth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 1 02:05:32 PDT 2019
ro created this revision.
ro added reviewers: rsmith, rnk.
Herald added subscribers: fedor.sergeev, Anastasia, mgorny, jyknight.
Herald added a reviewer: bollu.
Herald added a project: clang.
This patch is a prerequisite for using `LangStandard` from `Driver` in https://reviews.llvm.org/D64793.
It moves `LangStandard*` and `InputKind::Language` to `Basic`. It is mostly
mechanical, with only a few changes of note:
- I've renamed `OpenCL` to `LF_OpenCL` in `enum LangFeatures` to avoid a clash with `OpenCL` in `enum Language`.
- Now that `getLangStandardForName`, which is currently unused, also checks both canonical and alias names, I've introduced a helper `getLangKind` which factors out a code pattern already used 3 times.
The patch has been tested on `x86_64-pc-solaris2.11`, `sparcv9-sun-solaris2.11`,
and `x86_64-pc-linux-gnu`.
However, it will need companion patches for `lldb` and `polly` which both use either
or both of `LangStandard.h` and `InputKind::*`. To avoid everyone's time, I'll only
write and test them once it becomes clear that the current approach is acceptable.
Repository:
rC Clang
https://reviews.llvm.org/D65562
Files:
include/clang/Basic/LangStandard.h
include/clang/Basic/LangStandards.def
include/clang/Driver/Options.td
include/clang/Frontend/CompilerInvocation.h
include/clang/Frontend/FrontendOptions.h
include/clang/Frontend/LangStandard.h
include/clang/Frontend/LangStandards.def
include/clang/module.modulemap
lib/Basic/CMakeLists.txt
lib/Basic/LangStandards.cpp
lib/CodeGen/CodeGenAction.cpp
lib/Frontend/ASTUnit.cpp
lib/Frontend/CMakeLists.txt
lib/Frontend/CompilerInstance.cpp
lib/Frontend/CompilerInvocation.cpp
lib/Frontend/FrontendAction.cpp
lib/Frontend/FrontendActions.cpp
lib/Frontend/FrontendOptions.cpp
lib/Frontend/LangStandards.cpp
lib/Frontend/PrecompiledPreamble.cpp
lib/Frontend/Rewrite/FrontendActions.cpp
lib/StaticAnalyzer/Frontend/ModelInjector.cpp
lib/Tooling/InterpolatingCompilationDatabase.cpp
unittests/Frontend/CodeGenActionTest.cpp
unittests/Frontend/FrontendActionTest.cpp
unittests/Frontend/OutputStreamTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65562.212753.patch
Type: text/x-patch
Size: 42632 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190801/56dc25de/attachment-0001.bin>
More information about the cfe-commits
mailing list