[llvm-commits] [llvm] r150632 - in /llvm/trunk: include/llvm/Module.h lib/VMCore/Module.cpp
Bill Wendling
isanbard at gmail.com
Wed Feb 15 15:27:51 PST 2012
Author: void
Date: Wed Feb 15 17:27:50 2012
New Revision: 150632
URL: http://llvm.org/viewvc/llvm-project?rev=150632&view=rev
Log:
Use the enum instead of 'unsigned'.
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=150632&r1=150631&r2=150632&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Module.h (original)
+++ llvm/trunk/include/llvm/Module.h Wed Feb 15 17:27:50 2012
@@ -180,10 +180,10 @@
enum ModAttrBehavior { Error = 1, Warning = 2, Require = 3, Override = 4 };
struct ModuleFlagEntry {
- unsigned Behavior;
+ ModAttrBehavior Behavior;
MDString *Key;
Value *Val;
- ModuleFlagEntry(unsigned B, MDString *K, Value *V)
+ ModuleFlagEntry(ModAttrBehavior B, MDString *K, Value *V)
: Behavior(B), Key(K), Val(V) {}
};
Modified: llvm/trunk/lib/VMCore/Module.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Module.cpp?rev=150632&r1=150631&r2=150632&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Module.cpp (original)
+++ llvm/trunk/lib/VMCore/Module.cpp Wed Feb 15 17:27:50 2012
@@ -339,7 +339,8 @@
ConstantInt *Behavior = cast<ConstantInt>(Flag->getOperand(0));
MDString *Key = cast<MDString>(Flag->getOperand(1));
Value *Val = Flag->getOperand(2);
- Flags.push_back(ModuleFlagEntry(Behavior->getZExtValue(), Key, Val));
+ Flags.push_back(ModuleFlagEntry(ModAttrBehavior(Behavior->getZExtValue()),
+ Key, Val));
}
}
More information about the llvm-commits
mailing list