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/Basic/Targets.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/Basic/Targets.cpp')
-rw-r--r-- | clang/lib/Basic/Targets.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index c72982bf221..9e81ed7db2f 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/lib/Basic/Targets.cpp @@ -629,6 +629,7 @@ public: UserLabelPrefix = ""; SizeType = UnsignedInt; PtrDiffType = SignedInt; + IntPtrType = SignedInt; } virtual void getTargetDefines(std::vector<char> &Defines) const { X86_32TargetInfo::getTargetDefines(Defines); @@ -937,6 +938,7 @@ namespace { SizeType = UnsignedInt; IntMaxType = SignedLong; UIntMaxType = UnsignedLong; + IntPtrType = SignedShort; PtrDiffType = SignedInt; DescriptionString = "e-p:16:8:8-i8:8:8-i16:8:8-i32:8:8"; } |