From 399eae61e900d70e72c28466230ed5b048e819ae Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 15 Feb 2012 23:27:50 +0000 Subject: [PATCH] Use the enum instead of 'unsigned'. llvm-svn: 150632 --- llvm/include/llvm/Module.h | 4 ++-- llvm/lib/VMCore/Module.cpp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/llvm/include/llvm/Module.h b/llvm/include/llvm/Module.h index e068f93deb39..c331837f8188 100644 --- a/llvm/include/llvm/Module.h +++ b/llvm/include/llvm/Module.h @@ -180,10 +180,10 @@ public: 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) {} }; diff --git a/llvm/lib/VMCore/Module.cpp b/llvm/lib/VMCore/Module.cpp index 9de5db5a2b25..cc6ae0e000f7 100644 --- a/llvm/lib/VMCore/Module.cpp +++ b/llvm/lib/VMCore/Module.cpp @@ -339,7 +339,8 @@ 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(Behavior->getZExtValue(), Key, Val)); + Flags.push_back(ModuleFlagEntry(ModAttrBehavior(Behavior->getZExtValue()), + Key, Val)); } }