]> granicus.if.org Git - clang/commit
Move functionality for handling module maps as inputs from the -emit-module
authorRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 28 Apr 2017 01:49:42 +0000 (01:49 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 28 Apr 2017 01:49:42 +0000 (01:49 +0000)
commit463eb6ab523e7700156ec62b34593a5c50a79872
tree91583261284caf4ac8f944c8e695eb2bf8003b1c
parentecd30bdd0122f58936d648ab1f457370e84c0662
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.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301610 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Frontend/FrontendActions.h
include/clang/Frontend/FrontendOptions.h
lib/Frontend/CompilerInstance.cpp
lib/Frontend/CompilerInvocation.cpp
lib/Frontend/FrontendAction.cpp
lib/Frontend/FrontendActions.cpp
lib/Frontend/FrontendOptions.cpp
test/Modules/preprocess-module.cpp [new file with mode: 0644]