Skip to content

Commit 7acd666

Browse files
committed
[DTLTO] Code refactor - Fix compile errors on Linux.
1 parent dbc1e81 commit 7acd666

2 files changed

Lines changed: 11 additions & 12 deletions

File tree

llvm/include/llvm/DTLTO/DTLTO.h

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ class DTLTO : public LTO {
6060
AddBufferFn AddBufferArg, bool SaveTempsArg)
6161
: Base(std::move(Conf), Backend, ParallelCodeGenParallelismLevel,
6262
LTOMode),
63-
OnWriteCb(OnWrite), ShouldEmitIndexFiles(EmitIndexFiles),
64-
ShouldEmitImportFiles(EmitImportsFiles),
63+
AddBuffer(AddBufferArg), SaveTemps(SaveTempsArg),
64+
ShouldEmitIndexFiles(EmitIndexFiles),
65+
ShouldEmitImportFiles(EmitImportsFiles), OnWriteCb(OnWrite),
6566
DistributorParams{Distributor, DistributorArgs,
6667
RemoteCompiler, RemoteCompilerPrependArgs,
67-
RemoteCompilerArgs, LinkerOutputFile},
68-
AddBuffer(AddBufferArg), SaveTemps(SaveTempsArg) {
68+
RemoteCompilerArgs, LinkerOutputFile} {
6969
assert(!LinkerOutputFile.empty() && "expected a valid linker output file");
7070
}
7171

@@ -109,7 +109,7 @@ class DTLTO : public LTO {
109109
LLVM_ABI Error handleArchiveInputs();
110110

111111
// Remove temporary files created to enable distribution.
112-
LLVM_ABI void cleanup();
112+
LLVM_ABI void cleanup() override;
113113

114114
public:
115115
// Mutable and const accessors to the LTO configuration object.
@@ -321,11 +321,10 @@ class DTLTO : public LTO {
321321
ArrayRef<StringRef> RemoteCompilerPrependArgsArg,
322322
ArrayRef<StringRef> RemoteCompilerArgsArg,
323323
StringRef LinkerOutputFileArg)
324-
: DistributorPath(DistributorArg), DistributorArgs(DistributorArgsArg),
325-
RemoteCompiler(RemoteCompilerArg),
324+
: LinkerOutputFile(LinkerOutputFileArg), DistributorPath(DistributorArg),
325+
DistributorArgs(DistributorArgsArg), RemoteCompiler(RemoteCompilerArg),
326326
RemoteCompilerPrependArgs(RemoteCompilerPrependArgsArg),
327-
RemoteCompilerArgs(RemoteCompilerArgsArg),
328-
LinkerOutputFile(LinkerOutputFileArg) {}
327+
RemoteCompilerArgs(RemoteCompilerArgsArg) {}
329328

330329
// Output linker file path.
331330
SString LinkerOutputFile;
@@ -372,8 +371,8 @@ class DistributionDriver {
372371
DistributionDriver(DTLTO::DistributionDriverParams &ParamsArg,
373372
ArrayRef<DTLTO::Job> JobsArg, bool SaveTempsArg,
374373
std::function<void(StringRef)> AddToClenupArg)
375-
: Params{ParamsArg}, Jobs{JobsArg}, SaveTemps{SaveTempsArg},
376-
AddToCleanup{AddToClenupArg} {};
374+
: Params{ParamsArg}, SaveTemps{SaveTempsArg},
375+
AddToCleanup{AddToClenupArg}, Jobs{JobsArg} {};
377376

378377
private:
379378
DTLTO::DistributionDriverParams &Params;

llvm/lib/DTLTO/DTLTO.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ void lto::DTLTO::cleanup() {
247247
removeFile(Name);
248248
}
249249
}
250-
// Base::cleanup();
250+
Base::cleanup();
251251
}
252252

253253
// Runs the DTLTO thin link phase, producing per-module summary indices,

0 commit comments

Comments
 (0)