summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/Targets.cpp
diff options
context:
space:
mode:
authorEli Bendersky <eliben@google.com>2015-04-01 20:29:18 +0000
committerEli Bendersky <eliben@google.com>2015-04-01 20:29:18 +0000
commit1346717068fbc6e63994c5c66377a4ab62e3f32e (patch)
tree82650e19d2a33163d76cb93919bd7635729eca2b /clang/lib/Basic/Targets.cpp
parentd2f6c726e77c2943f8723d0f9dd65f68b92ef0e0 (diff)
downloadbcm5719-llvm-1346717068fbc6e63994c5c66377a4ab62e3f32e.tar.gz
bcm5719-llvm-1346717068fbc6e63994c5c66377a4ab62e3f32e.zip
Set the type of ptrdiff_t to signed on NVPTX targets
It was unsigned before, which is unlike any other target and also doesn't make much sense. llvm-svn: 233836
Diffstat (limited to 'clang/lib/Basic/Targets.cpp')
-rw-r--r--clang/lib/Basic/Targets.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp
index 33dfcca8045..fb2588622c1 100644
--- a/clang/lib/Basic/Targets.cpp
+++ b/clang/lib/Basic/Targets.cpp
@@ -1595,20 +1595,22 @@ public:
public:
NVPTX32TargetInfo(const llvm::Triple &Triple) : NVPTXTargetInfo(Triple) {
PointerWidth = PointerAlign = 32;
- SizeType = PtrDiffType = TargetInfo::UnsignedInt;
+ SizeType = TargetInfo::UnsignedInt;
+ PtrDiffType = TargetInfo::SignedInt;
IntPtrType = TargetInfo::SignedInt;
DescriptionString = "e-p:32:32-i64:64-v16:16-v32:32-n16:32:64";
- }
+ }
};
class NVPTX64TargetInfo : public NVPTXTargetInfo {
public:
NVPTX64TargetInfo(const llvm::Triple &Triple) : NVPTXTargetInfo(Triple) {
PointerWidth = PointerAlign = 64;
- SizeType = PtrDiffType = TargetInfo::UnsignedLong;
+ SizeType = TargetInfo::UnsignedLong;
+ PtrDiffType = TargetInfo::SignedLong;
IntPtrType = TargetInfo::SignedLong;
DescriptionString = "e-i64:64-v16:16-v32:32-n16:32:64";
- }
+ }
};
static const unsigned R600AddrSpaceMap[] = {
OpenPOWER on IntegriCloud