summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.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/CompilerInvocation.cpp
parent469214426ac525c12ec83d6a3b2e86f0ded1e57f (diff)
downloadbcm5719-llvm-32fbe31246fa498c4170411dfda3ae85b7c39c4e.tar.gz
bcm5719-llvm-32fbe31246fa498c4170411dfda3ae85b7c39c4e.zip
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/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 60e3442837e..a64b8cf8830 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -492,17 +492,17 @@ static void FrontendOptsToArgs(const FrontendOptions &Opts,
bool NeedLang = false;
for (unsigned i = 0, e = Opts.Inputs.size(); i != e; ++i)
- if (FrontendOptions::getInputKindForExtension(Opts.Inputs[i].second) !=
- Opts.Inputs[i].first)
+ if (FrontendOptions::getInputKindForExtension(Opts.Inputs[i].File) !=
+ Opts.Inputs[i].Kind)
NeedLang = true;
if (NeedLang) {
Res.push_back("-x");
- Res.push_back(getInputKindName(Opts.Inputs[0].first));
+ Res.push_back(getInputKindName(Opts.Inputs[0].Kind));
}
for (unsigned i = 0, e = Opts.Inputs.size(); i != e; ++i) {
- assert((!NeedLang || Opts.Inputs[i].first == Opts.Inputs[0].first) &&
+ assert((!NeedLang || Opts.Inputs[i].Kind == Opts.Inputs[0].Kind) &&
"Unable to represent this input vector!");
- Res.push_back(Opts.Inputs[i].second);
+ Res.push_back(Opts.Inputs[i].File);
}
if (!Opts.OutputFile.empty()) {
@@ -1463,7 +1463,7 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
if (i == 0)
DashX = IK;
}
- Opts.Inputs.push_back(std::make_pair(IK, Inputs[i]));
+ Opts.Inputs.push_back(FrontendInputFile(Inputs[i], IK));
}
return DashX;
OpenPOWER on IntegriCloud