Skip to content

Commit d03ff1d

Browse files
author
Alexander Yermolovich
committed
minor nits
1 parent 77ae0a2 commit d03ff1d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

bolt/include/bolt/Core/BinaryFunction.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ class BinaryFunction {
428428
/// Function order for streaming into the destination binary.
429429
uint32_t Index{-1U};
430430

431-
/// Indicates if the function is safe to fold.
431+
/// Indicates function is referenced by none-control flow instruction.
432432
bool HasAddressTaken{false};
433433

434434
/// Get basic block index assuming it belongs to this function.
@@ -820,10 +820,10 @@ class BinaryFunction {
820820
return nullptr;
821821
}
822822

823-
/// Indicates if the function is safe to fold.
823+
/// Returns true if function is referenced in none-control flow instructions..
824824
bool hasAddressTaken() const { return HasAddressTaken; }
825825

826-
/// Sets the function is not safe to fold.
826+
/// Sets whether function is referenced in none-control flow instructions.
827827
void setHasAddressTaken(bool Hat) { HasAddressTaken = Hat; }
828828

829829
/// Returns the raw binary encoding of this function.

bolt/lib/Passes/IdenticalCodeFolding.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ namespace bolt {
357357
/// Scans symbol table and creates a bit vector of memory addresses of vtables.
358358
static void processSymbolTable(const BinaryContext &BC,
359359
llvm::BitVector &BitVector) {
360-
for (auto [Address, Data] : BC.getBinaryData()) {
360+
for (auto &[Address, Data] : BC.getBinaryData()) {
361361
// Filter out all symbols that are not vtables.
362362
if (!Data->getName().starts_with("_ZTV"))
363363
continue;

0 commit comments

Comments
 (0)