r202667 - Revert "Preprocessor: Add __ALIGNOF_MAX_ALIGN_T__"
David Majnemer
david.majnemer at gmail.com
Sun Mar 2 15:01:10 PST 2014
Author: majnemer
Date: Sun Mar 2 17:01:10 2014
New Revision: 202667
URL: http://llvm.org/viewvc/llvm-project?rev=202667&view=rev
Log:
Revert "Preprocessor: Add __ALIGNOF_MAX_ALIGN_T__"
This commit reverts r201037, it's functionality is not needed given the
definition of std::max_align_t in libcxx circa r201843.
Modified:
cfe/trunk/lib/Frontend/InitPreprocessor.cpp
cfe/trunk/test/Preprocessor/init.c
Modified: cfe/trunk/lib/Frontend/InitPreprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitPreprocessor.cpp?rev=202667&r1=202666&r2=202667&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/InitPreprocessor.cpp (original)
+++ cfe/trunk/lib/Frontend/InitPreprocessor.cpp Sun Mar 2 17:01:10 2014
@@ -602,9 +602,6 @@ static void InitializePredefinedMacros(c
DefineType("__CHAR16_TYPE__", TI.getChar16Type(), Builder);
DefineType("__CHAR32_TYPE__", TI.getChar32Type(), Builder);
- Builder.defineMacro("__ALIGNOF_MAX_ALIGN_T__",
- Twine(TI.getSuitableAlign() / TI.getCharWidth()));
-
DefineFloatMacros(Builder, "FLT", &TI.getFloatFormat(), "F");
DefineFloatMacros(Builder, "DBL", &TI.getDoubleFormat(), "");
DefineFloatMacros(Builder, "LDBL", &TI.getLongDoubleFormat(), "L");
Modified: cfe/trunk/test/Preprocessor/init.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/init.c?rev=202667&r1=202666&r2=202667&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/init.c (original)
+++ cfe/trunk/test/Preprocessor/init.c Sun Mar 2 17:01:10 2014
@@ -216,7 +216,6 @@
//
// AARCH64:#define _LP64 1
// AARCH64:#define __AARCH64EL__ 1
-// AARCH64:#define __ALIGNOF_MAX_ALIGN_T__ 16
// AARCH64:#define __ARM_64BIT_STATE 1
// AARCH64:#define __ARM_ARCH 8
// AARCH64:#define __ARM_ARCH_ISA_A64 1
@@ -316,7 +315,6 @@
//
// AARCH64-NETBSD:#define _LP64 1
// AARCH64-NETBSD:#define __AARCH64EL__ 1
-// AARCH64-NETBSD:#define __ALIGNOF_MAX_ALIGN_T__ 16
// AARCH64-NETBSD:#define __ARM_64BIT_STATE 1
// AARCH64-NETBSD:#define __ARM_ARCH 8
// AARCH64-NETBSD:#define __ARM_ARCH_ISA_A64 1
@@ -416,7 +414,6 @@
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=arm-none-none < /dev/null | FileCheck -check-prefix ARM %s
//
// ARM-NOT:#define _LP64
-// ARM:#define __ALIGNOF_MAX_ALIGN_T__ 8
// ARM:#define __APCS_32__ 1
// ARM:#define __ARMEL__ 1
// ARM:#define __ARM_ARCH_6J__ 1
@@ -517,7 +514,6 @@
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=arm-none-linux-gnueabi -target-feature +soft-float -target-feature +soft-float-abi < /dev/null | FileCheck -check-prefix ARMEABISOFTFP %s
//
// ARM-NOT:#define _LP64
-// ARMEABISOFTFP:#define __ALIGNOF_MAX_ALIGN_T__ 8
// ARMEABISOFTFP:#define __APCS_32__ 1
// ARMEABISOFTFP:#define __ARMEL__ 1
// ARMEABISOFTFP:#define __ARM_ARCH 6
@@ -623,7 +619,6 @@
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=arm-none-linux-gnueabi < /dev/null | FileCheck -check-prefix ARMEABIHARDFP %s
//
// ARM-NOT:#define _LP64
-// ARMEABIHARDFP:#define __ALIGNOF_MAX_ALIGN_T__ 8
// ARMEABIHARDFP:#define __APCS_32__ 1
// ARMEABIHARDFP:#define __ARMEL__ 1
// ARMEABIHARDFP:#define __ARM_ARCH 6
@@ -777,7 +772,6 @@
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=i386-none-none < /dev/null | FileCheck -check-prefix I386 %s
//
// I386-NOT:#define _LP64
-// I386:#define __ALIGNOF_MAX_ALIGN_T__ 16
// I386:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
// I386:#define __CHAR16_TYPE__ unsigned short
// I386:#define __CHAR32_TYPE__ unsigned int
@@ -876,7 +870,6 @@
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=i386-pc-linux-gnu -target-cpu pentium4 < /dev/null | FileCheck -check-prefix I386-LINUX %s
//
// I386-LINUX-NOT:#define _LP64
-// I386-LINUX:#define __ALIGNOF_MAX_ALIGN_T__ 16
// I386-LINUX:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
// I386-LINUX:#define __CHAR16_TYPE__ unsigned short
// I386-LINUX:#define __CHAR32_TYPE__ unsigned int
@@ -975,7 +968,6 @@
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=i386-netbsd < /dev/null | FileCheck -check-prefix I386-NETBSD %s
//
// I386-NETBSD-NOT:#define _LP64
-// I386-NETBSD:#define __ALIGNOF_MAX_ALIGN_T__ 16
// I386-NETBSD:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
// I386-NETBSD:#define __CHAR16_TYPE__ unsigned short
// I386-NETBSD:#define __CHAR32_TYPE__ unsigned int
@@ -1092,7 +1084,6 @@
// MIPS32BE:#define _MIPS_SZINT 32
// MIPS32BE:#define _MIPS_SZLONG 32
// MIPS32BE:#define _MIPS_SZPTR 32
-// MIPS32BE:#define __ALIGNOF_MAX_ALIGN_T__ 8
// MIPS32BE:#define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__
// MIPS32BE:#define __CHAR16_TYPE__ unsigned short
// MIPS32BE:#define __CHAR32_TYPE__ unsigned int
@@ -1212,7 +1203,6 @@
// MIPS32EL:#define _MIPS_SZINT 32
// MIPS32EL:#define _MIPS_SZLONG 32
// MIPS32EL:#define _MIPS_SZPTR 32
-// MIPS32EL:#define __ALIGNOF_MAX_ALIGN_T__ 8
// MIPS32EL:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
// MIPS32EL:#define __CHAR16_TYPE__ unsigned short
// MIPS32EL:#define __CHAR32_TYPE__ unsigned int
@@ -1329,7 +1319,6 @@
// MIPS64BE:#define _MIPS_SZINT 32
// MIPS64BE:#define _MIPS_SZLONG 64
// MIPS64BE:#define _MIPS_SZPTR 64
-// MIPS64BE:#define __ALIGNOF_MAX_ALIGN_T__ 16
// MIPS64BE:#define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__
// MIPS64BE:#define __CHAR16_TYPE__ unsigned short
// MIPS64BE:#define __CHAR32_TYPE__ unsigned int
@@ -1448,7 +1437,6 @@
// MIPS64EL:#define _MIPS_SZINT 32
// MIPS64EL:#define _MIPS_SZLONG 64
// MIPS64EL:#define _MIPS_SZPTR 64
-// MIPS64EL:#define __ALIGNOF_MAX_ALIGN_T__ 16
// MIPS64EL:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
// MIPS64EL:#define __CHAR16_TYPE__ unsigned short
// MIPS64EL:#define __CHAR32_TYPE__ unsigned int
@@ -1702,7 +1690,6 @@
//
// MSP430:#define MSP430 1
// MSP430-NOT:#define _LP64
-// MSP430:#define __ALIGNOF_MAX_ALIGN_T__ 2
// MSP430:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
// MSP430:#define __CHAR16_TYPE__ unsigned short
// MSP430:#define __CHAR32_TYPE__ unsigned int
@@ -1796,7 +1783,6 @@
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=nvptx-none-none < /dev/null | FileCheck -check-prefix NVPTX32 %s
//
// NVPTX32-NOT:#define _LP64
-// NVPTX32:#define __ALIGNOF_MAX_ALIGN_T__ 8
// NVPTX32:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
// NVPTX32:#define __CHAR16_TYPE__ unsigned short
// NVPTX32:#define __CHAR32_TYPE__ unsigned int
@@ -1894,7 +1880,6 @@
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=nvptx64-none-none < /dev/null | FileCheck -check-prefix NVPTX64 %s
//
// NVPTX64:#define _LP64 1
-// NVPTX64:#define __ALIGNOF_MAX_ALIGN_T__ 8
// NVPTX64:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
// NVPTX64:#define __CHAR16_TYPE__ unsigned short
// NVPTX64:#define __CHAR32_TYPE__ unsigned int
@@ -1997,7 +1982,6 @@
// PPC603E:#define _ARCH_PPCGR 1
// PPC603E:#define _BIG_ENDIAN 1
// PPC603E-NOT:#define _LP64
-// PPC603E:#define __ALIGNOF_MAX_ALIGN_T__ 8
// PPC603E:#define __BIG_ENDIAN__ 1
// PPC603E:#define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__
// PPC603E:#define __CHAR16_TYPE__ unsigned short
@@ -2107,7 +2091,6 @@
// PPC64:#define _ARCH_PWR7 1
// PPC64:#define _BIG_ENDIAN 1
// PPC64:#define _LP64 1
-// PPC64:#define __ALIGNOF_MAX_ALIGN_T__ 8
// PPC64:#define __BIG_ENDIAN__ 1
// PPC64:#define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__
// PPC64:#define __CHAR16_TYPE__ unsigned short
@@ -2221,7 +2204,6 @@
// PPC64LE:#define _ARCH_PWR7 1
// PPC64LE:#define _LITTLE_ENDIAN 1
// PPC64LE:#define _LP64 1
-// PPC64LE:#define __ALIGNOF_MAX_ALIGN_T__ 8
// PPC64LE:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
// PPC64LE:#define __CHAR16_TYPE__ unsigned short
// PPC64LE:#define __CHAR32_TYPE__ unsigned int
@@ -2487,7 +2469,6 @@
// PPC64-LINUX:#define _ARCH_PPC64 1
// PPC64-LINUX:#define _BIG_ENDIAN 1
// PPC64-LINUX:#define _LP64 1
-// PPC64-LINUX:#define __ALIGNOF_MAX_ALIGN_T__ 8
// PPC64-LINUX:#define __BIG_ENDIAN__ 1
// PPC64-LINUX:#define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__
// PPC64-LINUX:#define __CHAR16_TYPE__ unsigned short
@@ -2595,7 +2576,6 @@
// PPC:#define _ARCH_PPC 1
// PPC:#define _BIG_ENDIAN 1
// PPC-NOT:#define _LP64
-// PPC:#define __ALIGNOF_MAX_ALIGN_T__ 8
// PPC:#define __BIG_ENDIAN__ 1
// PPC:#define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__
// PPC:#define __CHAR16_TYPE__ unsigned short
@@ -2698,7 +2678,6 @@
// PPC-LINUX:#define _ARCH_PPC 1
// PPC-LINUX:#define _BIG_ENDIAN 1
// PPC-LINUX-NOT:#define _LP64
-// PPC-LINUX:#define __ALIGNOF_MAX_ALIGN_T__ 8
// PPC-LINUX:#define __BIG_ENDIAN__ 1
// PPC-LINUX:#define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__
// PPC-LINUX:#define __CHAR16_TYPE__ unsigned short
@@ -2802,7 +2781,6 @@
//
// PPC-DARWIN:#define _ARCH_PPC 1
// PPC-DARWIN:#define _BIG_ENDIAN 1
-// PPC-DARWIN:#define __ALIGNOF_MAX_ALIGN_T__ 16
// PPC-DARWIN:#define __BIG_ENDIAN__ 1
// PPC-DARWIN:#define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__
// PPC-DARWIN:#define __CHAR16_TYPE__ unsigned short
@@ -3001,7 +2979,6 @@
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=sparc-none-none < /dev/null | FileCheck -check-prefix SPARC %s
//
// SPARC-NOT:#define _LP64
-// SPARC:#define __ALIGNOF_MAX_ALIGN_T__ 8
// SPARC:#define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__
// SPARC:#define __CHAR16_TYPE__ unsigned short
// SPARC:#define __CHAR32_TYPE__ unsigned int
@@ -3100,7 +3077,6 @@
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=tce-none-none < /dev/null | FileCheck -check-prefix TCE %s
//
// TCE-NOT:#define _LP64
-// TCE:#define __ALIGNOF_MAX_ALIGN_T__ 4
// TCE:#define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__
// TCE:#define __CHAR16_TYPE__ unsigned short
// TCE:#define __CHAR32_TYPE__ unsigned int
@@ -3196,7 +3172,6 @@
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=x86_64-none-none < /dev/null | FileCheck -check-prefix X86_64 %s
//
// X86_64:#define _LP64 1
-// X86_64:#define __ALIGNOF_MAX_ALIGN_T__ 16
// X86_64:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
// X86_64:#define __CHAR16_TYPE__ unsigned short
// X86_64:#define __CHAR32_TYPE__ unsigned int
@@ -3301,7 +3276,6 @@
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=x86_64-pc-linux-gnu < /dev/null | FileCheck -check-prefix X86_64-LINUX %s
//
// X86_64-LINUX:#define _LP64 1
-// X86_64-LINUX:#define __ALIGNOF_MAX_ALIGN_T__ 16
// X86_64-LINUX:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
// X86_64-LINUX:#define __CHAR16_TYPE__ unsigned short
// X86_64-LINUX:#define __CHAR32_TYPE__ unsigned int
@@ -3412,7 +3386,6 @@
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=x86_64-netbsd < /dev/null | FileCheck -check-prefix X86_64-NETBSD %s
//
// X86_64-NETBSD:#define _LP64 1
-// X86_64-NETBSD:#define __ALIGNOF_MAX_ALIGN_T__ 16
// X86_64-NETBSD:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
// X86_64-NETBSD:#define __CHAR16_TYPE__ unsigned short
// X86_64-NETBSD:#define __CHAR32_TYPE__ unsigned int
More information about the cfe-commits
mailing list