From 3376bad13216da8950bcdeb564df26d5ce4c12bc Mon Sep 17 00:00:00 2001 From: Aaron Puchert Date: Tue, 10 Dec 2024 19:25:36 +0100 Subject: [PATCH] Eliminate duplicate call in Clang driver (NFC) The only difference is the usage of `JobAction* JA` versus `Action* A` in one argument, but `JA = cast(A)`, and the called function is inherited from `Action`. --- clang/lib/Driver/Driver.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 6ba13d734116..fb73b62cf2da 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -5815,15 +5815,10 @@ InputInfoList Driver::BuildJobsForActionNoCache( } } else { if (UnbundlingResults.empty()) - T->ConstructJob( - C, *JA, Result, InputInfos, - C.getArgsForToolChain(TC, BoundArch, JA->getOffloadingDeviceKind()), - LinkingOutput); + T->ConstructJob(C, *JA, Result, InputInfos, Args, LinkingOutput); else - T->ConstructJobMultipleOutputs( - C, *JA, UnbundlingResults, InputInfos, - C.getArgsForToolChain(TC, BoundArch, JA->getOffloadingDeviceKind()), - LinkingOutput); + T->ConstructJobMultipleOutputs(C, *JA, UnbundlingResults, InputInfos, + Args, LinkingOutput); } return {Result}; }