summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2016-03-23 18:46:57 +0000
committerNico Weber <nicolasweber@gmx.de>2016-03-23 18:46:57 +0000
commitf54146c1789544b7348823a3cc6f488009de630e (patch)
tree11a005f94cfb5f7bcbd49b60bee37218773809f2 /clang/lib/Frontend/CompilerInstance.cpp
parentbcd660a9085557c79fa55f2f7e873dc4286e98cd (diff)
downloadbcm5719-llvm-f54146c1789544b7348823a3cc6f488009de630e.tar.gz
bcm5719-llvm-f54146c1789544b7348823a3cc6f488009de630e.zip
clang-cl: Fix remaining bugs in interaction of /Yc and /FI /showIncludes.
Instead of putting the /Yc header into ExtraDeps, give DependencyOutputOptions a dedicated field for /Yc mode, and let HeaderIncludesCallback hang on to the full DependencyOutputOptions object, not just ExtraDeps. Reverts parts of r263352 that are now no longer needed. llvm-svn: 264182
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index 453e6dc394f..a57023ad79a 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -360,18 +360,18 @@ void CompilerInstance::createPreprocessor(TranslationUnitKind TUKind) {
// Handle generating header include information, if requested.
if (DepOpts.ShowHeaderIncludes)
- AttachHeaderIncludeGen(*PP, DepOpts.ExtraDeps);
+ AttachHeaderIncludeGen(*PP, DepOpts);
if (!DepOpts.HeaderIncludeOutputFile.empty()) {
StringRef OutputPath = DepOpts.HeaderIncludeOutputFile;
if (OutputPath == "-")
OutputPath = "";
- AttachHeaderIncludeGen(*PP, DepOpts.ExtraDeps,
+ AttachHeaderIncludeGen(*PP, DepOpts,
/*ShowAllHeaders=*/true, OutputPath,
/*ShowDepth=*/false);
}
if (DepOpts.PrintShowIncludes) {
- AttachHeaderIncludeGen(*PP, DepOpts.ExtraDeps,
+ AttachHeaderIncludeGen(*PP, DepOpts,
/*ShowAllHeaders=*/true, /*OutputPath=*/"",
/*ShowDepth=*/true, /*MSStyle=*/true);
}
@@ -765,7 +765,7 @@ bool CompilerInstance::InitializeSourceManager(
/*SuggestedModule=*/nullptr, /*SkipCache=*/true);
// Also add the header to /showIncludes output.
if (File)
- DepOpts.ExtraDeps.push_back(File->getName());
+ DepOpts.ShowIncludesPretendHeader = File->getName();
}
if (!File) {
Diags.Report(diag::err_fe_error_reading) << InputFile;
OpenPOWER on IntegriCloud