diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-01-20 16:28:04 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-01-20 16:28:04 +0000 |
commit | 1f6b2b5c82b2d2d3935b0db76352a04e9877b73f (patch) | |
tree | 3e13bde8bfb2c3bab74a8c5062361b750429dee6 /lib/Frontend/CompilerInvocation.cpp | |
parent | b7ff74a6764ad837ce348bc7dd0f0804e4dbf492 (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/CompilerInvocation.cpp')
-rw-r--r-- | lib/Frontend/CompilerInvocation.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index 60e3442837..a64b8cf883 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/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; |