[llvm] r179703 - Appease a gcc warning about an overflow in a constant conversion.

Bill Wendling isanbard at gmail.com
Wed Apr 17 11:26:03 PDT 2013


Author: void
Date: Wed Apr 17 13:26:02 2013
New Revision: 179703

URL: http://llvm.org/viewvc/llvm-project?rev=179703&view=rev
Log:
Appease a gcc warning about an overflow in a constant conversion.

Modified:
    llvm/trunk/lib/IR/Core.cpp

Modified: llvm/trunk/lib/IR/Core.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Core.cpp?rev=179703&r1=179702&r2=179703&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Core.cpp (original)
+++ llvm/trunk/lib/IR/Core.cpp Wed Apr 17 13:26:02 2013
@@ -1446,7 +1446,8 @@ void LLVMAddFunctionAttr(LLVMValueRef Fn
 void LLVMAddTargetDependentFunctionAttr(LLVMValueRef Fn, const char *A,
                                         const char *V) {
   Function *Func = unwrap<Function>(Fn);
-  AttributeSet::AttrIndex Idx = AttributeSet::FunctionIndex;
+  AttributeSet::AttrIndex Idx =
+    AttributeSet::AttrIndex(AttributeSet::FunctionIndex);
   AttrBuilder B;
 
   B.addAttribute(A, V);





More information about the llvm-commits mailing list