[lld] r200519 - MSVC2012 does not choose to use uint64_t as underlying type without this.

Rui Ueyama ruiu at google.com
Thu Jan 30 22:28:32 PST 2014


Author: ruiu
Date: Fri Jan 31 00:28:32 2014
New Revision: 200519

URL: http://llvm.org/viewvc/llvm-project?rev=200519&view=rev
Log:
MSVC2012 does not choose to use uint64_t as underlying type without this.

MSVC2012 seems to choose int as the underlying type for an enum even if one of
its member is unsigned long long.

Modified:
    lld/trunk/include/lld/ReaderWriter/PECOFFLinkingContext.h

Modified: lld/trunk/include/lld/ReaderWriter/PECOFFLinkingContext.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/ReaderWriter/PECOFFLinkingContext.h?rev=200519&r1=200518&r2=200519&view=diff
==============================================================================
--- lld/trunk/include/lld/ReaderWriter/PECOFFLinkingContext.h (original)
+++ lld/trunk/include/lld/ReaderWriter/PECOFFLinkingContext.h Fri Jan 31 00:28:32 2014
@@ -250,10 +250,10 @@ protected:
   virtual std::unique_ptr<File> createUndefinedSymbolFile() const;
 
 private:
-  enum {
+  enum : uint64_t {
     invalidBaseAddress = UINT64_MAX,
-    pe32DefaultBaseAddress = 0x400000UL,
-    pe32PlusDefaultBaseAddress = 0x140000000UL
+    pe32DefaultBaseAddress = 0x400000U,
+    pe32PlusDefaultBaseAddress = 0x140000000U
  };
 
   // The start address for the program. The default value for the executable is





More information about the llvm-commits mailing list