Add an Action* member to InputInfo.
Summary:
The CUDA toolchain needs to know which Actions created which InputInfos,
because it needs to attach GPU archs to the various InputInfos.
Reviewers: echristo
Subscribers: jfb, dschuff, jhen, tra, cfe-commits
Differential Revision: http://reviews.llvm.org/D16078
llvm-svn: 257411
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index 254348c..8248a16 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -1801,9 +1801,9 @@
Input.claim();
if (Input.getOption().matches(options::OPT_INPUT)) {
const char *Name = Input.getValue();
- return InputInfo(Name, A->getType(), Name);
+ return InputInfo(A, Name, /* BaseInput = */ Name);
}
- return InputInfo(&Input, A->getType(), "");
+ return InputInfo(A, &Input, /* BaseInput = */ "");
}
if (const BindArchAction *BAA = dyn_cast<BindArchAction>(A)) {
@@ -1877,11 +1877,11 @@
// Determine the place to write output to, if any.
InputInfo Result;
if (JA->getType() == types::TY_Nothing)
- Result = InputInfo(A->getType(), BaseInput);
+ Result = InputInfo(A, BaseInput);
else
- Result = InputInfo(GetNamedOutputPath(C, *JA, BaseInput, BoundArch,
- AtTopLevel, MultipleArchs),
- A->getType(), BaseInput);
+ Result = InputInfo(A, GetNamedOutputPath(C, *JA, BaseInput, BoundArch,
+ AtTopLevel, MultipleArchs),
+ BaseInput);
if (CCCPrintBindings && !CCGenDiagnostics) {
llvm::errs() << "# \"" << T->getToolChain().getTripleString() << '"'