From d98cea8c8bd43551a290f7f752086d81d61d42be Mon Sep 17 00:00:00 2001 From: Justin Lebar Date: Mon, 11 Jan 2016 23:15:21 +0000 Subject: 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 --- clang/lib/Driver/Driver.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'clang/lib/Driver/Driver.cpp') diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 254348c9afe..8248a165c81 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -1801,9 +1801,9 @@ InputInfo Driver::BuildJobsForAction(Compilation &C, const Action *A, 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(A)) { @@ -1877,11 +1877,11 @@ InputInfo Driver::BuildJobsForAction(Compilation &C, const Action *A, // 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() << '"' -- cgit v1.2.3