diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-04-28 01:49:42 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-04-28 01:49:42 +0000 |
commit | f74d946624f30d60fd3f90a9545a455308931c32 (patch) | |
tree | 7b557e0dfc4727fa3d53543984bdcf0e1a1aeaca /clang/lib/Frontend/FrontendOptions.cpp | |
parent | 7fca8c0757a5ee5f290844376c7f8c5f3c1ffcfe (diff) | |
download | bcm5719-llvm-f74d946624f30d60fd3f90a9545a455308931c32.tar.gz bcm5719-llvm-f74d946624f30d60fd3f90a9545a455308931c32.zip |
Move functionality for handling module maps as inputs from the -emit-module
action to the general FrontendAction infrastructure.
This permits applying -E, -ast-dump, -fsyntax-only, and so on to a module map
compilation. (The -E form is not currently especially useful yet as there's no
good way to take the output and use it to actually build a module.)
In order to support this, -cc1 now accepts -x <lang>-module-map in all cases
where it accepts -x <lang> for a language we can parse (not ir/ast). And for
uniformity, we also accept -x <lang>-header for all such languages (we used
to reject for cuda and renderscript), and -x <lang>-cpp-output for all such
languages (we used to reject for c, cl, and renderscript).
(None of these new alternatives are accepted by the driver yet, so no
user-visible changes.)
llvm-svn: 301610
Diffstat (limited to 'clang/lib/Frontend/FrontendOptions.cpp')
-rw-r--r-- | clang/lib/Frontend/FrontendOptions.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/Frontend/FrontendOptions.cpp b/clang/lib/Frontend/FrontendOptions.cpp index eec24107946..dca434588fb 100644 --- a/clang/lib/Frontend/FrontendOptions.cpp +++ b/clang/lib/Frontend/FrontendOptions.cpp @@ -16,17 +16,17 @@ InputKind FrontendOptions::getInputKindForExtension(StringRef Extension) { .Cases("ast", "pcm", InputKind(InputKind::Unknown, InputKind::Precompiled)) .Case("c", InputKind::C) .Cases("S", "s", InputKind::Asm) - .Case("i", InputKind(InputKind::C, true)) - .Case("ii", InputKind(InputKind::CXX, true)) - .Case("cui", InputKind(InputKind::CUDA, true)) + .Case("i", InputKind(InputKind::C).getPreprocessed()) + .Case("ii", InputKind(InputKind::CXX).getPreprocessed()) + .Case("cui", InputKind(InputKind::CUDA).getPreprocessed()) .Case("m", InputKind::ObjC) - .Case("mi", InputKind(InputKind::ObjC, true)) + .Case("mi", InputKind(InputKind::ObjC).getPreprocessed()) .Cases("mm", "M", InputKind::ObjCXX) - .Case("mii", InputKind(InputKind::ObjCXX, true)) + .Case("mii", InputKind(InputKind::ObjCXX).getPreprocessed()) .Cases("C", "cc", "cp", InputKind::CXX) .Cases("cpp", "CPP", "c++", "cxx", "hpp", InputKind::CXX) .Case("cppm", InputKind::CXX) - .Case("iim", InputKind(InputKind::CXX, true)) + .Case("iim", InputKind(InputKind::CXX).getPreprocessed()) .Case("cl", InputKind::OpenCL) .Case("cu", InputKind::CUDA) .Cases("ll", "bc", InputKind::LLVM_IR) |