[llvm-commits] [llvm] r150679 - in /llvm/trunk: include/llvm/Module.h lib/VMCore/Module.cpp
Bill Wendling
isanbard at gmail.com
Thu Feb 16 02:28:11 PST 2012
Author: void
Date: Thu Feb 16 04:28:10 2012
New Revision: 150679
URL: http://llvm.org/viewvc/llvm-project?rev=150679&view=rev
Log:
s/ModAttrBehavior/ModFlagBehavior/g to be consistent with how module flags are named elsewhere.
Modified:
llvm/trunk/include/llvm/Module.h
llvm/trunk/lib/VMCore/Module.cpp
Modified: llvm/trunk/include/llvm/Module.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Module.h?rev=150679&r1=150678&r2=150679&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Module.h (original)
+++ llvm/trunk/include/llvm/Module.h Thu Feb 16 04:28:10 2012
@@ -177,13 +177,13 @@
/// 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 @@
/// 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);
/// @}
Modified: llvm/trunk/lib/VMCore/Module.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Module.cpp?rev=150679&r1=150678&r2=150679&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Module.cpp (original)
+++ llvm/trunk/lib/VMCore/Module.cpp Thu Feb 16 04:28:10 2012
@@ -339,7 +339,7 @@
ConstantInt *Behavior = cast<ConstantInt>(Flag->getOperand(0));
MDString *Key = cast<MDString>(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 @@
/// 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 @@
};
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));
More information about the llvm-commits
mailing list