1//===--- InitPreprocessor.cpp - PP initialization code. ---------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
--- 648 unchanged lines hidden (view full) ---
657 DefineTypeSizeof("__SIZEOF_PTRDIFF_T__",
658 TI.getTypeWidth(TI.getPtrDiffType(0)), TI, Builder);
659 DefineTypeSizeof("__SIZEOF_SIZE_T__",
660 TI.getTypeWidth(TI.getSizeType()), TI, Builder);
661 DefineTypeSizeof("__SIZEOF_WCHAR_T__",
662 TI.getTypeWidth(TI.getWCharType()), TI, Builder);
663 DefineTypeSizeof("__SIZEOF_WINT_T__",
664 TI.getTypeWidth(TI.getWIntType()), TI, Builder);
665 // This is a temporary workaround while MIPS64 has not yet fully supported
666 // 128-bit integers. But declaration of int128 type is necessary even though
667 // __SIZEOF_INT128__ is undefined because c++ standard header files like
668 // limits throw error message if __int128 is not available.
669 if (TI.hasInt128Type() && !(TI.getTriple().getArch() == llvm::Triple::mips64el
670 || TI.getTriple().getArch() == llvm::Triple::mips64))
671 DefineTypeSizeof("__SIZEOF_INT128__", 128, TI, Builder);
672
673 DefineType("__INTMAX_TYPE__", TI.getIntMaxType(), Builder);
674 DefineFmt("__INTMAX", TI.getIntMaxType(), TI, Builder);
675 Builder.defineMacro("__INTMAX_C_SUFFIX__",
676 TI.getTypeConstantSuffix(TI.getIntMaxType()));
677 DefineType("__UINTMAX_TYPE__", TI.getUIntMaxType(), Builder);
678 DefineFmt("__UINTMAX", TI.getUIntMaxType(), TI, Builder);
--- 295 unchanged lines hidden ---
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
--- 648 unchanged lines hidden (view full) ---
657 DefineTypeSizeof("__SIZEOF_PTRDIFF_T__",
658 TI.getTypeWidth(TI.getPtrDiffType(0)), TI, Builder);
659 DefineTypeSizeof("__SIZEOF_SIZE_T__",
660 TI.getTypeWidth(TI.getSizeType()), TI, Builder);
661 DefineTypeSizeof("__SIZEOF_WCHAR_T__",
662 TI.getTypeWidth(TI.getWCharType()), TI, Builder);
663 DefineTypeSizeof("__SIZEOF_WINT_T__",
664 TI.getTypeWidth(TI.getWIntType()), TI, Builder);
665 // This is a temporary workaround while MIPS64 has not yet fully supported
666 // 128-bit integers. But declaration of int128 type is necessary even though
667 // __SIZEOF_INT128__ is undefined because c++ standard header files like
668 // limits throw error message if __int128 is not available.
669 if (TI.hasInt128Type() && !(TI.getTriple().getArch() == llvm::Triple::mips64el
670 || TI.getTriple().getArch() == llvm::Triple::mips64))
671 DefineTypeSizeof("__SIZEOF_INT128__", 128, TI, Builder);
672
673 DefineType("__INTMAX_TYPE__", TI.getIntMaxType(), Builder);
674 DefineFmt("__INTMAX", TI.getIntMaxType(), TI, Builder);
675 Builder.defineMacro("__INTMAX_C_SUFFIX__",
676 TI.getTypeConstantSuffix(TI.getIntMaxType()));
677 DefineType("__UINTMAX_TYPE__", TI.getUIntMaxType(), Builder);
678 DefineFmt("__UINTMAX", TI.getUIntMaxType(), TI, Builder);
--- 295 unchanged lines hidden ---