diff options
Diffstat (limited to 'include/llvm/Module.h')
-rw-r--r-- | include/llvm/Module.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/llvm/Module.h b/include/llvm/Module.h index 046798845b..e068f93deb 100644 --- a/include/llvm/Module.h +++ b/include/llvm/Module.h @@ -179,6 +179,14 @@ public: /// values. enum ModAttrBehavior { Error = 1, Warning = 2, Require = 3, Override = 4 }; + struct ModuleFlagEntry { + unsigned Behavior; + MDString *Key; + Value *Val; + ModuleFlagEntry(unsigned B, MDString *K, Value *V) + : Behavior(B), Key(K), Val(V) {} + }; + /// @} /// @name Member Variables /// @{ @@ -401,6 +409,9 @@ public: /// @name Module Flags Accessors /// @{ + /// getModuleFlagsMetadata - Returns the module flags in the provided vector. + void getModuleFlagsMetadata(SmallVectorImpl<ModuleFlagEntry> &Flags) const; + /// getModuleFlagsMetadata - Returns the NamedMDNode in the module that /// represents module-level flags. This method returns null if there are no /// module-level flags. |