Skip to content

Commit 1378478

Browse files
committed
Address a few review comments
1 parent 3ae148e commit 1378478

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

clang/include/clang/Driver/Action.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -701,10 +701,10 @@ class OffloadWrapperJobAction : public JobAction {
701701
// Set the individual wrapping setting. This is used to tell the wrapper job
702702
// action that the wrapping (and subsequent compile step) should be done
703703
// with for-each instead of using -batch.
704-
void setIndividualWrap(bool SetValue) { IndividualWrap = SetValue; }
704+
void setWrapIndividualFiles() { WrapIndividualFiles = true; }
705705

706706
// Get the individual wrapping setting.
707-
bool getIndividualWrap() const { return IndividualWrap; }
707+
bool getWrapIndividualFiles() const { return WrapIndividualFiles; }
708708

709709
// Set the offload kind for the current wrapping job action. Default usage
710710
// is to use the kind of the current toolchain.
@@ -715,7 +715,7 @@ class OffloadWrapperJobAction : public JobAction {
715715

716716
private:
717717
bool CompileStep = true;
718-
bool IndividualWrap = false;
718+
bool WrapIndividualFiles = false;
719719
OffloadKind Kind = OFK_None;
720720
};
721721

clang/lib/Driver/Driver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5437,7 +5437,7 @@ class OffloadingActionBuilder final {
54375437
types::TY_Tempfilelist);
54385438
if (auto *OWA =
54395439
dyn_cast<OffloadWrapperJobAction>(CompiledDeviceAction))
5440-
OWA->setIndividualWrap(true);
5440+
OWA->setWrapIndividualFiles();
54415441
addDeps(CompiledDeviceAction, TC, BoundArch);
54425442
}
54435443
addDeps(DeviceAction, TC, BoundArch);
@@ -5838,7 +5838,7 @@ class OffloadingActionBuilder final {
58385838
FPGAArchiveWrapperInputs, types::TY_Tempfilelist);
58395839
if (auto *OWA =
58405840
dyn_cast<OffloadWrapperJobAction>(CompiledDeviceAction))
5841-
OWA->setIndividualWrap(true);
5841+
OWA->setWrapIndividualFiles();
58425842
addDeps(CompiledDeviceAction, TC, nullptr);
58435843
}
58445844
addDeps(DeviceAction, TC, nullptr);

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10269,7 +10269,7 @@ void OffloadWrapper::ConstructJob(Compilation &C, const JobAction &JA,
1026910269
// the wrapping and compile step should be done individually. Ideally this
1027010270
// would be controlled at the JobAction creation, but we cannot do that
1027110271
// until the compilation of the wrap is it's own JobAction.
10272-
bool IndividualWrapCompile = WrapperJob.getIndividualWrap();
10272+
bool IndividualWrapCompile = WrapperJob.getWrapIndividualFiles();
1027310273
const InputInfo TempOutput(types::TY_LLVM_BC, WrapperFileName,
1027410274
WrapperFileName);
1027510275
if (!IndividualWrapCompile &&
@@ -10316,7 +10316,7 @@ void OffloadWrapper::ConstructJob(Compilation &C, const JobAction &JA,
1031610316
SmallString<128> ClangPath(C.getDriver().Dir);
1031710317
llvm::sys::path::append(ClangPath, "clang");
1031810318
const char *Clang = C.getArgs().MakeArgString(ClangPath);
10319-
auto Cmd =
10319+
auto PostWrapCompileCmd =
1032010320
std::make_unique<Command>(JA, *this, ResponseFileSupport::None(),
1032110321
Clang, ClangArgs, std::nullopt);
1032210322
if (IndividualWrapCompile) {
@@ -10325,10 +10325,10 @@ void OffloadWrapper::ConstructJob(Compilation &C, const JobAction &JA,
1032510325
InputInfoList Inputs;
1032610326
Inputs.push_back(TempOutput);
1032710327
clang::driver::tools::SYCL::constructLLVMForeachCommand(
10328-
C, JA, std::move(Cmd), Inputs, Output, this, "", "bc",
10329-
ParallelJobs);
10328+
C, JA, std::move(PostWrapCompileCmd), Inputs, Output, this, "",
10329+
"bc", ParallelJobs);
1033010330
} else
10331-
C.addCommand(std::move(Cmd));
10331+
C.addCommand(std::move(PostWrapCompileCmd));
1033210332
}
1033310333
return;
1033410334
} // end of SYCL flavor of offload wrapper command creation

0 commit comments

Comments
 (0)