summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/FrontendAction.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2017-04-26 18:57:40 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2017-04-26 18:57:40 +0000
commit40c0efa5152b2dfd80d0a9e106a89c6231cbe2da (patch)
tree04a018ce3ef250cbc9f179be60652ee5175eff0f /clang/lib/Frontend/FrontendAction.cpp
parent088d001f05e62a393fd0ae2fa064db547e28664e (diff)
downloadbcm5719-llvm-40c0efa5152b2dfd80d0a9e106a89c6231cbe2da.tar.gz
bcm5719-llvm-40c0efa5152b2dfd80d0a9e106a89c6231cbe2da.zip
Refactor frontend InputKind to prepare for treating module maps as a distinct kind of input.
No functionality change intended. llvm-svn: 301442
Diffstat (limited to 'clang/lib/Frontend/FrontendAction.cpp')
-rw-r--r--clang/lib/Frontend/FrontendAction.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp
index 0dd07d9f817..9b1d60d579f 100644
--- a/clang/lib/Frontend/FrontendAction.cpp
+++ b/clang/lib/Frontend/FrontendAction.cpp
@@ -238,7 +238,8 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
// AST files follow a very different path, since they share objects via the
// AST unit.
- if (Input.getKind() == IK_AST) {
+ if (Input.getKind().getFormat() == InputKind::Precompiled) {
+ // FIXME: We should not be asserting on bad command-line arguments.
assert(!usesPreprocessorOnly() &&
"Attempt to pass AST file to preprocessor only action!");
assert(hasASTFileSupport() &&
@@ -297,7 +298,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
CI.createSourceManager(CI.getFileManager());
// IR files bypass the rest of initialization.
- if (Input.getKind() == IK_LLVM_IR) {
+ if (Input.getKind().getLanguage() == InputKind::LLVM_IR) {
assert(hasIRSupport() &&
"This action does not have IR file support!");
OpenPOWER on IntegriCloud