Driver: ConstructJob also needs to know the destination (where to put
its commands).
llvm-svn: 67179
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index 1e4cd7f..f06166e 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/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);
}
}