aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-07-31 21:43:56 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-07-31 21:43:56 +0000
commit590d96feea75246dee213cb528930df8f6234b87 (patch)
treef39c096d4be3f8a2f8ccefe3715fa7ed7eabc632 /contrib/llvm-project/clang/lib/Frontend/CompilerInvocation.cpp
parent5ffd83dbcc34f10e07f6d3e968ae6365869615f4 (diff)
parent2cedf089162d7ff08af2fb09e4adea44608e7233 (diff)
Notes
Diffstat (limited to 'contrib/llvm-project/clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--contrib/llvm-project/clang/lib/Frontend/CompilerInvocation.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/llvm-project/clang/lib/Frontend/CompilerInvocation.cpp b/contrib/llvm-project/clang/lib/Frontend/CompilerInvocation.cpp
index 75d7cf5d26d3..73114c6d76cb 100644
--- a/contrib/llvm-project/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/contrib/llvm-project/clang/lib/Frontend/CompilerInvocation.cpp
@@ -2022,8 +2022,9 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
// FIXME: Supporting '<lang>-header-cpp-output' would be useful.
bool Preprocessed = XValue.consume_back("-cpp-output");
bool ModuleMap = XValue.consume_back("-module-map");
- IsHeaderFile =
- !Preprocessed && !ModuleMap && XValue.consume_back("-header");
+ IsHeaderFile = !Preprocessed && !ModuleMap &&
+ XValue != "precompiled-header" &&
+ XValue.consume_back("-header");
// Principal languages.
DashX = llvm::StringSwitch<InputKind>(XValue)
@@ -2050,7 +2051,7 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
DashX = llvm::StringSwitch<InputKind>(XValue)
.Case("cpp-output", InputKind(Language::C).getPreprocessed())
.Case("assembler-with-cpp", Language::Asm)
- .Cases("ast", "pcm",
+ .Cases("ast", "pcm", "precompiled-header",
InputKind(Language::Unknown, InputKind::Precompiled))
.Case("ir", Language::LLVM_IR)
.Default(Language::Unknown);