[llvm-commits] [llvm] r141663 - in /llvm/trunk: Makefile.rules cmake/modules/HandleLLVMOptions.cmake include/llvm/Support/DataTypes.h.cmake

NAKAMURA Takumi geek4civic at gmail.com
Tue Oct 11 05:51:44 PDT 2011


Author: chapuni
Date: Tue Oct 11 07:51:44 2011
New Revision: 141663

URL: http://llvm.org/viewvc/llvm-project?rev=141663&view=rev
Log:
Add -D__STDC_FORMAT_MACROS to use PRIx64.

Modified:
    llvm/trunk/Makefile.rules
    llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
    llvm/trunk/include/llvm/Support/DataTypes.h.cmake

Modified: llvm/trunk/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=141663&r1=141662&r2=141663&view=diff
==============================================================================
--- llvm/trunk/Makefile.rules (original)
+++ llvm/trunk/Makefile.rules Tue Oct 11 07:51:44 2011
@@ -623,7 +623,7 @@
 endif # !HOST_OS - AuroraUX.
 
 LD.Flags      += -L$(LibDir) -L$(LLVMLibDir)
-CPP.BaseFlags += -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
+CPP.BaseFlags += -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
 # All -I flags should go here, so that they don't confuse llvm-config.
 CPP.Flags     += $(sort -I$(PROJ_OBJ_DIR) -I$(PROJ_SRC_DIR) \
 	         $(patsubst %,-I%/include,\

Modified: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/HandleLLVMOptions.cmake?rev=141663&r1=141662&r2=141663&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Tue Oct 11 07:51:44 2011
@@ -187,6 +187,7 @@
 endif( MSVC )
 
 add_llvm_definitions( -D__STDC_CONSTANT_MACROS )
+add_llvm_definitions( -D__STDC_FORMAT_MACROS )
 add_llvm_definitions( -D__STDC_LIMIT_MACROS )
 
 option(LLVM_INCLUDE_TESTS "Generate build targets for the LLVM unit tests." ON)

Modified: llvm/trunk/include/llvm/Support/DataTypes.h.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/DataTypes.h.cmake?rev=141663&r1=141662&r2=141663&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/DataTypes.h.cmake (original)
+++ llvm/trunk/include/llvm/Support/DataTypes.h.cmake Tue Oct 11 07:51:44 2011
@@ -164,6 +164,11 @@
 #ifndef UINT64_C
 # define UINT64_C(C) C##ui64
 #endif
+
+#ifndef PRIx64
+# define PRIx64 "I64x"
+#endif
+
 #endif /* _MSC_VER */
 
 /* Set defaults for constants which we cannot find. */





More information about the llvm-commits mailing list