From c7400488b947f9f13de99f00932c6eb0b5d22fa8 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Wed, 17 Apr 2013 17:51:19 +0000 Subject: Don't store AttributeSet::FunctionIndex as an int. GCC complains: Core.cpp:1449:27: warning: overflow in implicit constant conversion [-Woverflow] I'm not sure if that's really a problem here, but using the enum type is better style anyways. llvm-svn: 179696 --- llvm/lib/IR/Core.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/IR') diff --git a/llvm/lib/IR/Core.cpp b/llvm/lib/IR/Core.cpp index 50d1aaaff8f..c994ef2bdf8 100644 --- a/llvm/lib/IR/Core.cpp +++ b/llvm/lib/IR/Core.cpp @@ -1446,7 +1446,7 @@ void LLVMAddFunctionAttr(LLVMValueRef Fn, LLVMAttribute PA) { void LLVMAddTargetDependentFunctionAttr(LLVMValueRef Fn, const char *A, const char *V) { Function *Func = unwrap(Fn); - int Idx = AttributeSet::FunctionIndex; + AttributeSet::AttrIndex Idx = AttributeSet::FunctionIndex; AttrBuilder B; B.addAttribute(A, V); -- cgit v1.2.3