Skip to content

Commit 2807866

Browse files
authored
[NFC, SHT_LLVM_BB_ADDR_MAP] Introduce BBEntry::getID to be used downstream. (#148294)
1 parent 94bb9e1 commit 2807866

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/include/llvm/Object/ELFTypes.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "llvm/Support/Endian.h"
1919
#include "llvm/Support/Error.h"
2020
#include "llvm/Support/MathExtras.h"
21+
#include "llvm/Support/UniqueBBID.h"
2122
#include <cassert>
2223
#include <cstdint>
2324
#include <cstring>
@@ -926,6 +927,8 @@ struct BBAddrMap {
926927
: ID(ID), Offset(Offset), Size(Size), MD(MD),
927928
CallsiteOffsets(std::move(CallsiteOffsets)) {}
928929

930+
UniqueBBID getID() const { return {ID, 0}; }
931+
929932
bool operator==(const BBEntry &Other) const {
930933
return ID == Other.ID && Offset == Other.Offset && Size == Other.Size &&
931934
MD == Other.MD && CallsiteOffsets == Other.CallsiteOffsets;

0 commit comments

Comments
 (0)