[cfe-commits] r110442 - in /cfe/trunk: lib/Basic/Targets.cpp test/Preprocessor/init.c
Douglas Gregor
dgregor at apple.com
Fri Aug 6 05:37:53 PDT 2010
Author: dgregor
Date: Fri Aug 6 07:37:52 2010
New Revision: 110442
URL: http://llvm.org/viewvc/llvm-project?rev=110442&view=rev
Log:
Define _INTEGRAL_MAX_BITS for the win32 and win64 targets, from Per Lindén!
Modified:
cfe/trunk/lib/Basic/Targets.cpp
cfe/trunk/test/Preprocessor/init.c
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=110442&r1=110441&r2=110442&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Fri Aug 6 07:37:52 2010
@@ -1349,6 +1349,7 @@
// 300=386, 400=486, 500=Pentium, 600=Blend (default)
// We lost the original triple, so we use the default.
Builder.defineMacro("_M_IX86", "600");
+ Builder.defineMacro("_INTEGRAL_MAX_BITS", "64");
}
};
} // end anonymous namespace
@@ -1488,6 +1489,7 @@
MacroBuilder &Builder) const {
WindowsX86_64TargetInfo::getTargetDefines(Opts, Builder);
Builder.defineMacro("_M_X64");
+ Builder.defineMacro("_INTEGRAL_MAX_BITS", "64");
}
};
} // end anonymous namespace
Modified: cfe/trunk/test/Preprocessor/init.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/init.c?rev=110442&r1=110441&r2=110442&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/init.c (original)
+++ cfe/trunk/test/Preprocessor/init.c Fri Aug 6 07:37:52 2010
@@ -74,9 +74,10 @@
// C94:#define __STDC_VERSION__ 199409L
//
//
-// RUN: %clang_cc1 -fms-extensions -E -dM < /dev/null | FileCheck -check-prefix MSEXT %s
+// RUN: %clang_cc1 -fms-extensions -triple i686-pc-win32 -E -dM < /dev/null | FileCheck -check-prefix MSEXT %s
//
// MSEXT-NOT:#define __STDC__
+// MSEXT:#define _INTEGRAL_MAX_BITS 64
// MSEXT:#define __int16 __INT16_TYPE__
// MSEXT:#define __int32 __INT32_TYPE__
// MSEXT:#define __int64 __INT64_TYPE__
More information about the cfe-commits
mailing list