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 | 6ad474f82f0cf32e13128d89fa5ad3a37ae73530 (patch) | |
tree | 2d251332b75ff717f85737af03503d5e64239a35 /lib/Basic/Targets.cpp | |
parent | dd06e092305c9061bb270f07e0fc6d6946bbc2ad (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64495 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/Targets.cpp')
-rw-r--r-- | lib/Basic/Targets.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index c72982bf22..9e81ed7db2 100644 --- a/lib/Basic/Targets.cpp +++ b/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"; } |