[llvm] [llvm][IR] Add per-global code model attribute (PR #72077)
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 17 15:36:48 PST 2023
================
@@ -124,6 +129,28 @@ class GlobalObject : public GlobalValue {
/// appropriate default object file section.
void setSection(StringRef S);
+ /// Get the custom code model raw value of this global.
+ ///
+ unsigned getCodeModelRaw() const {
+ unsigned Data = getGlobalValueSubClassData();
----------------
aeubanks wrote:
was going to ask that this protect against extra bits, but I see that we already have an assert in `setCodeModel()`
https://github.com/llvm/llvm-project/pull/72077
More information about the llvm-commits
mailing list