diff options
author | Dan Gohman <dan433584@gmail.com> | 2018-07-24 00:29:58 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2018-07-24 00:29:58 +0000 |
commit | df07a35912d78781ed6a62a7c032bfef5085a4f5 (patch) | |
tree | 4ad674b5fa797d04fc234760a950b0db3dc2159c /clang/lib/Basic | |
parent | 311322aabcd1fd8000c26903326f2ae3c82a146c (diff) | |
download | bcm5719-llvm-df07a35912d78781ed6a62a7c032bfef5085a4f5.tar.gz bcm5719-llvm-df07a35912d78781ed6a62a7c032bfef5085a4f5.zip |
[WebAssembly] Change size_t to `unsigned long`.
Changing it to unsigned long (which is 32-bit on wasm32) makes it the same
type as wasm64 (where unsigned long is 64-bit), which would eliminate the most
common cause for mangled names being different between wasm32 and wasm64. For
example, export lists containing symbol names could now often be the same
between wasm32 and wasm64.
Differential Revision: https://reviews.llvm.org/D40526
llvm-svn: 337783
Diffstat (limited to 'clang/lib/Basic')
-rw-r--r-- | clang/lib/Basic/Targets/WebAssembly.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/Basic/Targets/WebAssembly.h b/clang/lib/Basic/Targets/WebAssembly.h index b0e466b8d8c..c04c5cb6fb3 100644 --- a/clang/lib/Basic/Targets/WebAssembly.h +++ b/clang/lib/Basic/Targets/WebAssembly.h @@ -47,9 +47,11 @@ public: LongDoubleWidth = LongDoubleAlign = 128; LongDoubleFormat = &llvm::APFloat::IEEEquad(); MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64; - SizeType = UnsignedInt; - PtrDiffType = SignedInt; - IntPtrType = SignedInt; + // size_t being unsigned long for both wasm32 and wasm64 makes mangled names + // more consistent between the two. + SizeType = UnsignedLong; + PtrDiffType = SignedLong; + IntPtrType = SignedLong; } protected: |