Skip to content

Commit

Permalink
Apply suggestions from @ellishg
Browse files Browse the repository at this point in the history
  • Loading branch information
samolisov committed Jun 15, 2024
1 parent e6a918e commit 944d5f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1855,10 +1855,7 @@ static bool InstrumentAllFunctions(
instrumentOneFunc(F, &M, TLI, BPI, BFI, ComdatMembers, IsCS);
AnythingInstrumented = true;
}
if (!AnythingInstrumented)
return false;

return true;
return AnythingInstrumented;
}

PreservedAnalyses
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ TEST_P(PGOInstrumentationGenInstrumentTest, Instrumented) {

const auto *IRInstrVar =
M->getNamedGlobal(INSTR_PROF_QUOTE(INSTR_PROF_RAW_VERSION_VAR));
EXPECT_THAT(IRInstrVar, NotNull());
ASSERT_THAT(IRInstrVar, NotNull());
EXPECT_FALSE(IRInstrVar->isDeclaration());
}

Expand Down Expand Up @@ -217,7 +217,7 @@ TEST_P(PGOInstrumentationGenIgnoreTest, NotInstrumented) {

const auto *IRInstrVar =
M->getNamedGlobal(INSTR_PROF_QUOTE(INSTR_PROF_RAW_VERSION_VAR));
EXPECT_THAT(IRInstrVar, NotNull());
ASSERT_THAT(IRInstrVar, NotNull());
EXPECT_FALSE(IRInstrVar->isDeclaration());
}

Expand Down

0 comments on commit 944d5f5

Please sign in to comment.