Driver: ConstructJob also needs to know the destination (where to put
its commands).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67179 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index 1e4cd7f..f06166e 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -751,6 +751,7 @@
if (!PJ) {
PJ = new PipedJob();
cast<JobList>(Dest)->addJob(PJ);
+ Dest = PJ;
}
Result = InputInfo(PJ, A->getType(), BaseInput);
} else {
@@ -768,7 +769,7 @@
llvm::errs() << "], output: " << Result.getAsString() << "\n";
} else {
const ArgList &TCArgs = C.getArgsForToolChain(TC);
- T.ConstructJob(C, *JA, Result, InputInfos, TCArgs, LinkingOutput);
+ T.ConstructJob(C, *JA, *Dest, Result, InputInfos, TCArgs, LinkingOutput);
}
}