diff options
author | Chris Lattner <sabre@nondot.org> | 2009-02-13 22:28:55 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-02-13 22:28:55 +0000 |
commit | 7e4c81c8c69f57cb1fa02d5cd3e1898a12fa333c (patch) | |
tree | 21080758dbaae7bbbc77adb4552fc9a96918a8c9 /clang/lib/Lex/Preprocessor.cpp | |
parent | 02b63b42873620d9931f44d32ed2c95f776eef07 (diff) | |
download | bcm5719-llvm-7e4c81c8c69f57cb1fa02d5cd3e1898a12fa333c.tar.gz bcm5719-llvm-7e4c81c8c69f57cb1fa02d5cd3e1898a12fa333c.zip |
Give TargetInfo a new IntPtrType to hold the intptr_t type for
a target.
Make Preprocessor.cpp define a new __INTPTR_TYPE__ macro based on this.
On linux/32, set intptr_t to int, instead of long. This fixes PR3563.
llvm-svn: 64495
Diffstat (limited to 'clang/lib/Lex/Preprocessor.cpp')
-rw-r--r-- | clang/lib/Lex/Preprocessor.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp index f16d83c5a2e..d769720634d 100644 --- a/clang/lib/Lex/Preprocessor.cpp +++ b/clang/lib/Lex/Preprocessor.cpp @@ -557,6 +557,7 @@ static void InitializePredefinedMacros(Preprocessor &PP, DefineType("__INTMAX_TYPE__", TI.getIntMaxType(), Buf); DefineType("__UINTMAX_TYPE__", TI.getUIntMaxType(), Buf); DefineType("__PTRDIFF_TYPE__", TI.getPtrDiffType(0), Buf); + DefineType("__INTPTR_TYPE__", TI.getIntPtrType(), Buf); DefineType("__SIZE_TYPE__", TI.getSizeType(), Buf); DefineType("__WCHAR_TYPE__", TI.getWCharType(), Buf); // FIXME: TargetInfo hookize __WINT_TYPE__. |