[llvm] Compute GUIDs once and store in metadata (PR #184065)
Mircea Trofin via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 7 17:19:21 PST 2026
================
@@ -576,7 +577,22 @@ class LLVM_ABI Module {
// Use global_size() to get the total number of global variables.
// Use globals() to get the range of all global variables.
+ std::optional<GlobalValue::GUID> getGUID(const Value* V) const {
+ const auto It = ValueToGUIDMap.find(V);
+ if (It == ValueToGUIDMap.end()) {
+ return {};
----------------
mtrofin wrote:
nit: return std::nullopt?
https://github.com/llvm/llvm-project/pull/184065
More information about the llvm-commits
mailing list