From 89cc16637d8e2d6c3b0ecb7dea63b0b2a0102167 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Thu, 16 Feb 2012 10:28:10 +0000 Subject: [PATCH] s/ModAttrBehavior/ModFlagBehavior/g to be consistent with how module flags are named elsewhere. llvm-svn: 150679 --- llvm/include/llvm/Module.h | 10 +++++----- llvm/lib/VMCore/Module.cpp | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/llvm/include/llvm/Module.h b/llvm/include/llvm/Module.h index c331837f8188..4ca8fdee5c6c 100644 --- a/llvm/include/llvm/Module.h +++ b/llvm/include/llvm/Module.h @@ -177,13 +177,13 @@ public: /// is an error for two (or more) llvm.module.flags with the /// same ID to have the Override behavior but different /// values. - enum ModAttrBehavior { Error = 1, Warning = 2, Require = 3, Override = 4 }; + enum ModFlagBehavior { Error = 1, Warning = 2, Require = 3, Override = 4 }; struct ModuleFlagEntry { - ModAttrBehavior Behavior; + ModFlagBehavior Behavior; MDString *Key; Value *Val; - ModuleFlagEntry(ModAttrBehavior B, MDString *K, Value *V) + ModuleFlagEntry(ModFlagBehavior B, MDString *K, Value *V) : Behavior(B), Key(K), Val(V) {} }; @@ -425,8 +425,8 @@ public: /// addModuleFlag - Add a module-level flag to the module-level flags /// metadata. It will create the module-level flags named metadata if it /// doesn't already exist. - void addModuleFlag(ModAttrBehavior Behavior, StringRef Key, Value *Val); - void addModuleFlag(ModAttrBehavior Behavior, StringRef Key, uint32_t Val); + void addModuleFlag(ModFlagBehavior Behavior, StringRef Key, Value *Val); + void addModuleFlag(ModFlagBehavior Behavior, StringRef Key, uint32_t Val); void addModuleFlag(MDNode *Node); /// @} diff --git a/llvm/lib/VMCore/Module.cpp b/llvm/lib/VMCore/Module.cpp index cc6ae0e000f7..e8bc6dbe9706 100644 --- a/llvm/lib/VMCore/Module.cpp +++ b/llvm/lib/VMCore/Module.cpp @@ -339,7 +339,7 @@ getModuleFlagsMetadata(SmallVectorImpl &Flags) const { ConstantInt *Behavior = cast(Flag->getOperand(0)); MDString *Key = cast(Flag->getOperand(1)); Value *Val = Flag->getOperand(2); - Flags.push_back(ModuleFlagEntry(ModAttrBehavior(Behavior->getZExtValue()), + Flags.push_back(ModuleFlagEntry(ModFlagBehavior(Behavior->getZExtValue()), Key, Val)); } } @@ -361,7 +361,7 @@ NamedMDNode *Module::getOrInsertModuleFlagsMetadata() { /// addModuleFlag - Add a module-level flag to the module-level flags /// metadata. It will create the module-level flags named metadata if it doesn't /// already exist. -void Module::addModuleFlag(ModAttrBehavior Behavior, StringRef Key, +void Module::addModuleFlag(ModFlagBehavior Behavior, StringRef Key, Value *Val) { Type *Int32Ty = Type::getInt32Ty(Context); Value *Ops[3] = { @@ -369,7 +369,7 @@ void Module::addModuleFlag(ModAttrBehavior Behavior, StringRef Key, }; getOrInsertModuleFlagsMetadata()->addOperand(MDNode::get(Context, Ops)); } -void Module::addModuleFlag(ModAttrBehavior Behavior, StringRef Key, +void Module::addModuleFlag(ModFlagBehavior Behavior, StringRef Key, uint32_t Val) { Type *Int32Ty = Type::getInt32Ty(Context); addModuleFlag(Behavior, Key, ConstantInt::get(Int32Ty, Val));