diff options
author | Joerg Sonnenberger <joerg@bec.de> | 2014-07-14 20:40:56 +0000 |
---|---|---|
committer | Joerg Sonnenberger <joerg@bec.de> | 2014-07-14 20:40:56 +0000 |
commit | 3809a7a9f639437d30f31e5c6fafa4e2e262affe (patch) | |
tree | 9d8b29ccfa8604ab675b6ea064a4c21ae7728a98 /clang/lib/Basic/Targets.cpp | |
parent | af9180fd0409431ce1a05f69212483a4d1c5c6c0 (diff) | |
download | bcm5719-llvm-3809a7a9f639437d30f31e5c6fafa4e2e262affe.tar.gz bcm5719-llvm-3809a7a9f639437d30f31e5c6fafa4e2e262affe.zip |
Introduce getCorrespondingUnsignedType() in TargetInfo to work like the
corresponding AST context function, only restricted to basic integer
types. Use this to ensure getUIntPtrType() gives types consistent with
getIntPtrType(). Fix NVPTX backend to give signed intptr_t.
llvm-svn: 212982
Diffstat (limited to 'clang/lib/Basic/Targets.cpp')
-rw-r--r-- | clang/lib/Basic/Targets.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index 2a6623425ba..7f70ad0ec05 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/lib/Basic/Targets.cpp @@ -1430,7 +1430,8 @@ namespace { public: NVPTX32TargetInfo(const llvm::Triple &Triple) : NVPTXTargetInfo(Triple) { PointerWidth = PointerAlign = 32; - SizeType = PtrDiffType = IntPtrType = TargetInfo::UnsignedInt; + SizeType = PtrDiffType = TargetInfo::UnsignedInt; + IntPtrType = TargetInfo::SignedInt; DescriptionString = "e-p:32:32-i64:64-v16:16-v32:32-n16:32:64"; } }; @@ -1439,7 +1440,8 @@ namespace { public: NVPTX64TargetInfo(const llvm::Triple &Triple) : NVPTXTargetInfo(Triple) { PointerWidth = PointerAlign = 64; - SizeType = PtrDiffType = IntPtrType = TargetInfo::UnsignedLongLong; + SizeType = PtrDiffType = TargetInfo::UnsignedLongLong; + IntPtrType = TargetInfo::SignedLongLong; DescriptionString = "e-i64:64-v16:16-v32:32-n16:32:64"; } }; |