llvm::GlobalValue::getGUIDOrFallback

Return the GUID for this value if it has been assigned, otherwise fall back to computing it based on its current name and linkage.

Synopsis

Declared in <llvm/IR/GlobalValue.h>

GUID
getGUIDOrFallback() const;

Description

This is to be used in situations where we need a GUID but can't guarantee that it's been computed. Notably, if we're reading from bitcode files that might pre-date the storage of GUIDs in metadata.

Return Value

The assigned GUID, or one computed from the current name and linkage.