Skip to content

Commit 873bc99

Browse files
committed
Address comments from ellishg
1 parent 411fc45 commit 873bc99

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

llvm/include/llvm/CGData/CodeGenData.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,14 @@ publishOutlinedHashTree(std::unique_ptr<OutlinedHashTree> HashTree) {
164164
CodeGenData::getInstance().publishOutlinedHashTree(std::move(HashTree));
165165
}
166166

167-
/// Initialize the two-codegen rounds.
168167
void initializeTwoCodegenRounds();
169168

170-
/// Save the current module before the first codegen round.
169+
/// Save \p TheModule before the first codegen round.
170+
/// \p Task represents the partition number in the parallel code generation
171+
/// process.
171172
void saveModuleForTwoRounds(const Module &TheModule, unsigned Task);
172173

173-
/// Load the current module before the second codegen round.
174+
/// Load the optimized module before the second codegen round.
174175
std::unique_ptr<Module> loadModuleForTwoRounds(BitcodeModule &OrigModule,
175176
unsigned Task,
176177
LLVMContext &Context);

llvm/lib/CGData/CodeGenData.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,9 @@ void warn(Error E, StringRef Whence) {
225225
}
226226

227227
static std::string getPath(StringRef Dir, unsigned Task) {
228-
return (Dir + "/" + llvm::Twine(Task) + ".saved_copy.bc").str();
228+
llvm::SmallString<128> Path(Dir);
229+
llvm::sys::path::append(Path, llvm::Twine(Task) + ".saved_copy.bc");
230+
return std::string(Path);
229231
}
230232

231233
void initializeTwoCodegenRounds() {

0 commit comments

Comments
 (0)