Skip to content

Commit 9d6df77

Browse files
[Clang] [NFC] Inline static helper function in Compilation.cpp (#152875)
This PR inlines the static `InputsOk` function in clang `Compilation.cpp` driver, because it was just a simple function call and was called only once. In addition, inlining it allows removing the double negation.
1 parent 8b44945 commit 9d6df77

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

clang/lib/Driver/Compilation.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,6 @@ static bool ActionFailed(const Action *A,
232232
return false;
233233
}
234234

235-
static bool InputsOk(const Command &C,
236-
const FailingCommandList &FailingCommands) {
237-
return !ActionFailed(&C.getSource(), FailingCommands);
238-
}
239-
240235
void Compilation::ExecuteJobs(const JobList &Jobs,
241236
FailingCommandList &FailingCommands,
242237
bool LogOnly) const {
@@ -245,7 +240,7 @@ void Compilation::ExecuteJobs(const JobList &Jobs,
245240
// In all but CLMode, execute all the jobs unless the necessary inputs for the
246241
// job is missing due to previous failures.
247242
for (const auto &Job : Jobs) {
248-
if (!InputsOk(Job, FailingCommands))
243+
if (ActionFailed(&Job.getSource(), FailingCommands))
249244
continue;
250245
const Command *FailingCommand = nullptr;
251246
if (int Res = ExecuteCommand(Job, FailingCommand, LogOnly)) {

0 commit comments

Comments
 (0)