[llvm-commits] fix the MSVC warning in include/llvm-c/Core.h
Kostya Serebryany
kcc at google.com
Mon Jan 23 11:02:58 PST 2012
My previous change in include/llvm-c/Core.h that introduced 64-bit
Attributes (r148553) caused a warning
while building with MSVC. http://llvm.org/bugs/show_bug.cgi?id=11828
The following patch fixes the problem (use "static const uint64_t" instead
of enum).
Ok to commit?
--kcc
Index: include/llvm-c/Core.h
===================================================================
--- include/llvm-c/Core.h (revision 148708)
+++ include/llvm-c/Core.h (working copy)
@@ -92,7 +92,7 @@
/** Used to get the users and usees of a Value. See the llvm::Use class. */
typedef struct LLVMOpaqueUse *LLVMUseRef;
-typedef enum {
+static const uint64_t
LLVMZExtAttribute = 1<<0,
LLVMSExtAttribute = 1<<1,
LLVMNoReturnAttribute = 1<<2,
@@ -119,8 +119,8 @@
LLVMReturnsTwice = 1 << 29,
LLVMUWTable = 1 << 30,
LLVMNonLazyBind = 1U << 31,
- LLVMAddressSafety = 1ULL << 32
-} LLVMAttribute;
+ LLVMAddressSafety = 1ULL << 32;
+typedef uint64_t LLVMAttribute;
typedef enum {
/* Terminator Instructions */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120123/9b5ffec8/attachment.html>
More information about the llvm-commits
mailing list