summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Sanders <daniel.sanders@imgtec.com>2015-04-27 08:12:42 +0000
committerDaniel Sanders <daniel.sanders@imgtec.com>2015-04-27 08:12:42 +0000
commitd4edcf675ffccad14d816b6d4f5f97e295b7b389 (patch)
treed219fb0011524b99efdf74eb9174d621cd623b3a
parent14545f84de5008e75ea9b5ad1f7fce043e717ae7 (diff)
Merging r228918:
------------------------------------------------------------------------ r228918 | vkalintiris | 2015-02-12 11:36:56 +0000 (Thu, 12 Feb 2015) | 5 lines [mips] Partially revert r223927: Removing __SIZEOF_INT128__ macro for MIPS64 Partially revert r223927 because LLVM gained support for 128-bit integers in r227089. Modify and keep the tests that verify the definition of the macro __SIZEOF_INT128__ for MIPS64 BE & LE in the preprocessor. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_36@235839 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Frontend/InitPreprocessor.cpp7
-rw-r--r--test/Preprocessor/init.c4
2 files changed, 3 insertions, 8 deletions
diff --git a/lib/Frontend/InitPreprocessor.cpp b/lib/Frontend/InitPreprocessor.cpp
index f4241a94ae..3550ac2515 100644
--- a/lib/Frontend/InitPreprocessor.cpp
+++ b/lib/Frontend/InitPreprocessor.cpp
@@ -662,12 +662,7 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
TI.getTypeWidth(TI.getWCharType()), TI, Builder);
DefineTypeSizeof("__SIZEOF_WINT_T__",
TI.getTypeWidth(TI.getWIntType()), TI, Builder);
- // This is a temporary workaround while MIPS64 has not yet fully supported
- // 128-bit integers. But declaration of int128 type is necessary even though
- // __SIZEOF_INT128__ is undefined because c++ standard header files like
- // limits throw error message if __int128 is not available.
- if (TI.hasInt128Type() && !(TI.getTriple().getArch() == llvm::Triple::mips64el
- || TI.getTriple().getArch() == llvm::Triple::mips64))
+ if (TI.hasInt128Type())
DefineTypeSizeof("__SIZEOF_INT128__", 128, TI, Builder);
DefineType("__INTMAX_TYPE__", TI.getIntMaxType(), Builder);
diff --git a/test/Preprocessor/init.c b/test/Preprocessor/init.c
index f3a1ba5d67..1502e78b4d 100644
--- a/test/Preprocessor/init.c
+++ b/test/Preprocessor/init.c
@@ -3752,7 +3752,7 @@
// MIPS64BE:#define __SIG_ATOMIC_WIDTH__ 32
// MIPS64BE:#define __SIZEOF_DOUBLE__ 8
// MIPS64BE:#define __SIZEOF_FLOAT__ 4
-// MIPS64BE-NOT:#define __SIZEOF_INT128__ 16
+// MIPS64BE:#define __SIZEOF_INT128__ 16
// MIPS64BE:#define __SIZEOF_INT__ 4
// MIPS64BE:#define __SIZEOF_LONG_DOUBLE__ 16
// MIPS64BE:#define __SIZEOF_LONG_LONG__ 8
@@ -3960,7 +3960,7 @@
// MIPS64EL:#define __SIG_ATOMIC_WIDTH__ 32
// MIPS64EL:#define __SIZEOF_DOUBLE__ 8
// MIPS64EL:#define __SIZEOF_FLOAT__ 4
-// MIPS64EL-NOT:#define __SIZEOF_INT128__ 16
+// MIPS64EL:#define __SIZEOF_INT128__ 16
// MIPS64EL:#define __SIZEOF_INT__ 4
// MIPS64EL:#define __SIZEOF_LONG_DOUBLE__ 16
// MIPS64EL:#define __SIZEOF_LONG_LONG__ 8