aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/ChainedIncludesSource.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
commit32fbe31246fa498c4170411dfda3ae85b7c39c4e (patch)
tree22b7aa0b9b223a4ae57b1fc8ae656357eaba9ee2 /clang/lib/Frontend/ChainedIncludesSource.cpp
parent469214426ac525c12ec83d6a3b2e86f0ded1e57f (diff)
downloadllvm-32fbe31246fa498c4170411dfda3ae85b7c39c4e.zip
llvm-32fbe31246fa498c4170411dfda3ae85b7c39c4e.tar.gz
llvm-32fbe31246fa498c4170411dfda3ae85b7c39c4e.tar.bz2
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. llvm-svn: 148546
Diffstat (limited to 'clang/lib/Frontend/ChainedIncludesSource.cpp')
-rw-r--r--clang/lib/Frontend/ChainedIncludesSource.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Frontend/ChainedIncludesSource.cpp b/clang/lib/Frontend/ChainedIncludesSource.cpp
index f1aa8a1..9694bc0 100644
--- a/clang/lib/Frontend/ChainedIncludesSource.cpp
+++ b/clang/lib/Frontend/ChainedIncludesSource.cpp
@@ -63,7 +63,7 @@ ChainedIncludesSource *ChainedIncludesSource::create(CompilerInstance &CI) {
assert(!includes.empty() && "No '-chain-include' in options!");
llvm::OwningPtr<ChainedIncludesSource> source(new ChainedIncludesSource());
- InputKind IK = CI.getFrontendOpts().Inputs[0].first;
+ InputKind IK = CI.getFrontendOpts().Inputs[0].Kind;
SmallVector<llvm::MemoryBuffer *, 4> serialBufs;
SmallVector<std::string, 4> serialBufNames;
@@ -82,7 +82,8 @@ ChainedIncludesSource *ChainedIncludesSource::create(CompilerInstance &CI) {
CInvok->getPreprocessorOpts().Macros.clear();
CInvok->getFrontendOpts().Inputs.clear();
- CInvok->getFrontendOpts().Inputs.push_back(std::make_pair(IK, includes[i]));
+ CInvok->getFrontendOpts().Inputs.push_back(FrontendInputFile(includes[i],
+ IK));
TextDiagnosticPrinter *DiagClient =
new TextDiagnosticPrinter(llvm::errs(), DiagnosticOptions());