Skip to content

Commit 8a0a020

Browse files
committed
Final nits.
1 parent 028c3cb commit 8a0a020

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

llvm/include/llvm/Object/ELFTypes.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -842,14 +842,14 @@ struct BBAddrMap {
842842

843843
// Encodes to minimum bit width representation.
844844
uint16_t encode() const {
845-
return (static_cast<uint8_t>(FuncEntryCount) << 0) |
846-
(static_cast<uint8_t>(BBFreq) << 1) |
847-
(static_cast<uint8_t>(BrProb) << 2) |
848-
(static_cast<uint8_t>(MultiBBRange) << 3) |
849-
(static_cast<uint8_t>(OmitBBEntries) << 4) |
850-
(static_cast<uint8_t>(CallsiteEndOffsets) << 5) |
851-
(static_cast<uint8_t>(BBHash) << 6) |
852-
(static_cast<uint8_t>(PostLinkCfg) << 7);
845+
return (static_cast<uint16_t>(FuncEntryCount) << 0) |
846+
(static_cast<uint16_t>(BBFreq) << 1) |
847+
(static_cast<uint16_t>(BrProb) << 2) |
848+
(static_cast<uint16_t>(MultiBBRange) << 3) |
849+
(static_cast<uint16_t>(OmitBBEntries) << 4) |
850+
(static_cast<uint16_t>(CallsiteEndOffsets) << 5) |
851+
(static_cast<uint16_t>(BBHash) << 6) |
852+
(static_cast<uint16_t>(PostLinkCfg) << 7);
853853
}
854854

855855
// Decodes from minimum bit width representation and validates no

llvm/test/tools/llvm-readobj/ELF/bb-addr-map-feature-warning.test

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ FileHeader:
99
Data: ELFDATA2LSB
1010
Type: ET_EXEC
1111

12-
1312
# CHECK: BBAddrMap [
1413
# CHECK-NEXT: warning: '[[FILE]]': unable to dump SHT_LLVM_BB_ADDR_MAP section with index 1: version should be >= 3 for SHT_LLVM_BB_ADDR_MAP when callsite offsets feature is enabled: version = 2 feature = 32
1514
Sections:
@@ -19,8 +18,6 @@ Sections:
1918
- Version: 2
2019
Feature: 0x20
2120

22-
23-
2421
# CHECK: BBAddrMap [
2522
# CHECK-NEXT: warning: '[[FILE]]': unable to dump SHT_LLVM_BB_ADDR_MAP section with index 2: version should be >= 4 for SHT_LLVM_BB_ADDR_MAP when basic block hash feature is enabled: version = 3 feature = 64
2623

0 commit comments

Comments
 (0)