Skip to content

Commit 4d9b85b

Browse files
committed
[Driver] Drop redundant arguments in various helper functions
The OutputInfo, ToolChain, and Triple can all be retrieved from the Compilation, so now that we're passing one of those around we don't need to pass the others explicitly. No functionality change.
1 parent 5ca7700 commit 4d9b85b

File tree

2 files changed

+68
-75
lines changed

2 files changed

+68
-75
lines changed

include/swift/Driver/Driver.h

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -308,22 +308,19 @@ class Driver {
308308
///
309309
/// \param C The Compilation which this Job will eventually be part of
310310
/// \param JA The Action for which a Job should be created
311-
/// \param OI The OutputInfo for which a Job should be created
312311
/// \param OFM The OutputFileMap for which a Job should be created
313-
/// \param TC The tool chain which should be used to create the Job
314312
/// \param AtTopLevel indicates whether or not this is a top-level Job
315313
/// \param JobCache maps existing Action/ToolChain pairs to Jobs
316314
///
317315
/// \returns a Job for the given Action/ToolChain pair
318316
Job *buildJobsForAction(Compilation &C, const JobAction *JA,
319-
const OutputInfo &OI, const OutputFileMap *OFM,
320-
StringRef workingDirectory, const ToolChain &TC,
317+
const OutputFileMap *OFM,
318+
StringRef workingDirectory,
321319
bool AtTopLevel, JobCacheMap &JobCache) const;
322320

323321
private:
324322
void computeMainOutput(Compilation &C, const JobAction *JA,
325-
const OutputInfo &OI, const OutputFileMap *OFM,
326-
const ToolChain &TC, bool AtTopLevel,
323+
const OutputFileMap *OFM, bool AtTopLevel,
327324
SmallVectorImpl<const Action *> &InputActions,
328325
SmallVectorImpl<const Job *> &InputJobs,
329326
const TypeToPathMap *OutputMap,
@@ -333,7 +330,7 @@ class Driver {
333330
llvm::SmallString<128> &Buf,
334331
CommandOutput *Output) const;
335332

336-
void chooseSwiftModuleOutputPath(Compilation &C, const OutputInfo &OI,
333+
void chooseSwiftModuleOutputPath(Compilation &C,
337334
const OutputFileMap *OFM,
338335
const TypeToPathMap *OutputMap,
339336
StringRef workingDirectory,
@@ -343,39 +340,39 @@ class Driver {
343340
const TypeToPathMap *OutputMap,
344341
StringRef workingDirectory,
345342
CommandOutput *Output) const;
343+
346344
void chooseRemappingOutputPath(Compilation &C, const TypeToPathMap *OutputMap,
347345
CommandOutput *Output) const;
348346

349347
void chooseSerializedDiagnosticsPath(Compilation &C, const JobAction *JA,
350-
const OutputInfo &OI,
351348
const TypeToPathMap *OutputMap,
352349
StringRef workingDirectory,
353350
CommandOutput *Output) const;
354351

355-
void chooseDependenciesOutputPaths(Compilation &C, const OutputInfo &OI,
352+
void chooseDependenciesOutputPaths(Compilation &C,
356353
const TypeToPathMap *OutputMap,
357354
StringRef workingDirectory,
358355
llvm::SmallString<128> &Buf,
359356
CommandOutput *Output) const;
360357

361-
void chooseOptimizationRecordPath(Compilation &C, const OutputInfo &OI,
358+
void chooseOptimizationRecordPath(Compilation &C,
362359
StringRef workingDirectory,
363360
llvm::SmallString<128> &Buf,
364361
CommandOutput *Output) const;
365362

366-
void chooseObjectiveCHeaderOutputPath(Compilation &C, const OutputInfo &OI,
363+
void chooseObjectiveCHeaderOutputPath(Compilation &C,
367364
const TypeToPathMap *OutputMap,
368365
StringRef workingDirectory,
369366
CommandOutput *Output) const;
370367

371-
void chooseLoadedModuleTracePath(Compilation &C, const OutputInfo &OI,
368+
void chooseLoadedModuleTracePath(Compilation &C,
372369
StringRef workingDirectory,
373370
llvm::SmallString<128> &Buf,
374371
CommandOutput *Output) const;
375372

376-
void chooseTBDPath(Compilation &C, const OutputInfo &OI,
377-
const TypeToPathMap *OutputMap, StringRef workingDirectory,
378-
llvm::SmallString<128> &Buf, CommandOutput *Output) const;
373+
void chooseTBDPath(Compilation &C, const TypeToPathMap *OutputMap,
374+
StringRef workingDirectory, llvm::SmallString<128> &Buf,
375+
CommandOutput *Output) const;
379376

380377
public:
381378
/// Handle any arguments which should be treated before building actions or

0 commit comments

Comments
 (0)