aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/FrontendActions.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-01-20 16:28:04 +0000
committerDouglas Gregor <dgregor@apple.com>2012-01-20 16:28:04 +0000
commit1f6b2b5c82b2d2d3935b0db76352a04e9877b73f (patch)
tree3e13bde8bfb2c3bab74a8c5062361b750429dee6 /lib/Frontend/FrontendActions.cpp
parentb7ff74a6764ad837ce348bc7dd0f0804e4dbf492 (diff)
Extract the (InputKind, std::string) pair used to describe inputs to
the front end into its own class, FrontendInputFile, to make it easier to introduce new per-input data. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148546 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/FrontendActions.cpp')
-rw-r--r--lib/Frontend/FrontendActions.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Frontend/FrontendActions.cpp b/lib/Frontend/FrontendActions.cpp
index 2261b30712..272474cea7 100644
--- a/lib/Frontend/FrontendActions.cpp
+++ b/lib/Frontend/FrontendActions.cpp
@@ -255,7 +255,8 @@ bool GenerateModuleAction::BeginSourceFileAction(CompilerInstance &CI,
if (UmbrellaHeader && HeaderContents.empty()) {
// Simple case: we have an umbrella header and there are no additional
// includes, we can just parse the umbrella header directly.
- setCurrentFile(UmbrellaHeader->getName(), getCurrentFileKind());
+ setCurrentInput(FrontendInputFile(UmbrellaHeader->getName(),
+ getCurrentFileKind()));
return true;
}
@@ -311,9 +312,8 @@ bool GenerateModuleAction::BeginSourceFileAction(CompilerInstance &CI,
ModTime);
llvm::MemoryBuffer *HeaderContentsBuf
= llvm::MemoryBuffer::getMemBufferCopy(HeaderContents);
- CI.getSourceManager().overrideFileContents(HeaderFile, HeaderContentsBuf);
-
- setCurrentFile(HeaderName, getCurrentFileKind());
+ CI.getSourceManager().overrideFileContents(HeaderFile, HeaderContentsBuf);
+ setCurrentInput(FrontendInputFile(HeaderName, getCurrentFileKind()));
return true;
}