Skip to content

Commit 7cdb175

Browse files
committed
nit: rename to validateInternalBranches()
1 parent 00755b3 commit 7cdb175

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

bolt/include/bolt/Core/BinaryFunction.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2320,15 +2320,15 @@ class BinaryFunction {
23202320
/// zero-value bytes.
23212321
bool isZeroPaddingAt(uint64_t Offset) const;
23222322

2323-
/// Validates if the target of an external direct branch/call is a valid
2323+
/// Validate if the target of an external direct branch/call is a valid
23242324
/// executable instruction.
23252325
/// Return true if the target is valid, false otherwise.
23262326
bool validateExternalBranch(uint64_t TargetAddress);
23272327

2328-
/// Validates if the target of an internal direct branch/call is a valid
2328+
/// Validate if the target of any internal direct branch/call is a valid
23292329
/// executable instruction.
2330-
/// Return true if the target is valid, false otherwise.
2331-
bool validateInternalBranch();
2330+
/// Return true if all the targets are valid, false otherwise.
2331+
bool validateInternalBranches();
23322332

23332333
/// Check that entry points have an associated instruction at their
23342334
/// offsets after disassembly.

bolt/lib/Core/BinaryFunction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1947,7 +1947,7 @@ bool BinaryFunction::validateExternalBranch(uint64_t TargetAddress) {
19471947
return true;
19481948
}
19491949

1950-
bool BinaryFunction::validateInternalBranch() {
1950+
bool BinaryFunction::validateInternalBranches() {
19511951
if (!isSimple())
19521952
return true;
19531953

bolt/lib/Rewrite/RewriteInstance.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3498,7 +3498,7 @@ void RewriteInstance::disassembleFunctions() {
34983498
if (!shouldDisassemble(Function))
34993499
continue;
35003500

3501-
Function.validateInternalBranch();
3501+
Function.validateInternalBranches();
35023502
Function.postProcessEntryPoints();
35033503
Function.postProcessJumpTables();
35043504
}

0 commit comments

Comments
 (0)