summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Driver.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2016-08-30 14:12:06 +0000
committerNico Weber <nicolasweber@gmx.de>2016-08-30 14:12:06 +0000
commite36ab4a0a4dbbc3f2be2fb8f7eab6fe039a4dc79 (patch)
treebc99ae96780b555be4a0c4c0d686d7c0ff128793 /clang/lib/Driver/Driver.cpp
parent27ac0d8670e2d98e6c725368906a68dd281613bb (diff)
downloadbcm5719-llvm-e36ab4a0a4dbbc3f2be2fb8f7eab6fe039a4dc79.tar.gz
bcm5719-llvm-e36ab4a0a4dbbc3f2be2fb8f7eab6fe039a4dc79.zip
Revert r280035 (and followups r280057, r280085), it caused PR30195
llvm-svn: 280091
Diffstat (limited to 'clang/lib/Driver/Driver.cpp')
-rw-r--r--clang/lib/Driver/Driver.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index 9081a6408ec..9871f29eb39 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -177,10 +177,6 @@ phases::ID Driver::getFinalPhase(const DerivedArgList &DAL,
(PhaseArg = DAL.getLastArg(options::OPT__SLASH_P))) {
FinalPhase = phases::Preprocess;
- // --precompile only runs up to precompilation.
- } else if ((PhaseArg = DAL.getLastArg(options::OPT__precompile))) {
- FinalPhase = phases::Precompile;
-
// -{fsyntax-only,-analyze,emit-ast} only run up to the compiler.
} else if ((PhaseArg = DAL.getLastArg(options::OPT_fsyntax_only)) ||
(PhaseArg = DAL.getLastArg(options::OPT_module_file_info)) ||
@@ -1689,14 +1685,12 @@ void Driver::BuildActions(Compilation &C, DerivedArgList &Args,
if (YcArg) {
// Add a separate precompile phase for the compile phase.
if (FinalPhase >= phases::Compile) {
- const types::ID HeaderInputType = types::TY_CXXHeader;
llvm::SmallVector<phases::ID, phases::MaxNumberOfPhases> PCHPL;
- types::getCompilationPhases(HeaderInputType, PCHPL);
+ types::getCompilationPhases(types::TY_CXXHeader, PCHPL);
Arg *PchInputArg = MakeInputArg(Args, Opts, YcArg->getValue());
// Build the pipeline for the pch file.
- Action *ClangClPch =
- C.MakeAction<InputAction>(*PchInputArg, HeaderInputType);
+ Action *ClangClPch = C.MakeAction<InputAction>(*PchInputArg, InputType);
for (phases::ID Phase : PCHPL)
ClangClPch = ConstructPhaseAction(C, Args, Phase, ClangClPch);
assert(ClangClPch);
@@ -1818,9 +1812,7 @@ Action *Driver::ConstructPhaseAction(Compilation &C, const ArgList &Args,
return C.MakeAction<PreprocessJobAction>(Input, OutputTy);
}
case phases::Precompile: {
- types::ID OutputTy = getPrecompiledType(Input->getType());
- assert(OutputTy != types::TY_INVALID &&
- "Cannot precompile this input type!");
+ types::ID OutputTy = types::TY_PCH;
if (Args.hasArg(options::OPT_fsyntax_only)) {
// Syntax checks should not emit a PCH file
OutputTy = types::TY_Nothing;
OpenPOWER on IntegriCloud