Skip to content

Conversation

@rlavaee
Copy link
Contributor

@rlavaee rlavaee commented Jul 11, 2025

No description provided.

@llvmbot
Copy link
Member

llvmbot commented Jul 11, 2025

@llvm/pr-subscribers-llvm-binary-utilities

Author: Rahman Lavaee (rlavaee)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/148294.diff

1 Files Affected:

  • (modified) llvm/include/llvm/Object/ELFTypes.h (+3)
diff --git a/llvm/include/llvm/Object/ELFTypes.h b/llvm/include/llvm/Object/ELFTypes.h
index d2d0f22309fd0..f22b376c3ab5b 100644
--- a/llvm/include/llvm/Object/ELFTypes.h
+++ b/llvm/include/llvm/Object/ELFTypes.h
@@ -18,6 +18,7 @@
 #include "llvm/Support/Endian.h"
 #include "llvm/Support/Error.h"
 #include "llvm/Support/MathExtras.h"
+#include "llvm/Support/UniqueBBID.h"
 #include <cassert>
 #include <cstdint>
 #include <cstring>
@@ -926,6 +927,8 @@ struct BBAddrMap {
         : ID(ID), Offset(Offset), Size(Size), MD(MD),
           CallsiteOffsets(std::move(CallsiteOffsets)) {}
 
+    UniqueBBID getID() const { return {ID, 0}; }
+
     bool operator==(const BBEntry &Other) const {
       return ID == Other.ID && Offset == Other.Offset && Size == Other.Size &&
              MD == Other.MD && CallsiteOffsets == Other.CallsiteOffsets;

@rlavaee rlavaee merged commit 2807866 into llvm:main Jul 11, 2025
9 of 11 checks passed
@jh7370
Copy link
Collaborator

jh7370 commented Jul 14, 2025

Probably needs some unit test coverage?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants