diff options
| author | Simon Atanasyan <simon@atanasyan.com> | 2019-02-13 18:27:09 +0000 |
|---|---|---|
| committer | Simon Atanasyan <simon@atanasyan.com> | 2019-02-13 18:27:09 +0000 |
| commit | 4c22a574140c799117d340d803c2ae0468ca3b86 (patch) | |
| tree | a9533b18f4aeadb4c8188b77c815c9ad797f5ef5 /clang/lib/Headers/unwind.h | |
| parent | 430d294f0b845c6fee710f5b5c33008ebe06ec69 (diff) | |
| download | bcm5719-llvm-4c22a574140c799117d340d803c2ae0468ca3b86.tar.gz bcm5719-llvm-4c22a574140c799117d340d803c2ae0468ca3b86.zip | |
[Headers][mips] Add `__attribute__((__mode__(__unwind_word__)))` to the _Unwind_Word / _Unwind_SWord definitions
The rationale of this change is to fix _Unwind_Word / _Unwind_SWord
definitions for MIPS N32 ABI. This ABI uses 32-bit pointers,
but _Unwind_Word and _Unwind_SWord types are eight bytes long.
# The __attribute__((__mode__(__unwind_word__))) is added to the type
definitions. It makes them equal to the corresponding definitions used
by GCC and allows to override types using `getUnwindWordWidth` function.
# The `getUnwindWordWidth` virtual function override in the `MipsTargetInfo`
class and provides correct type size values.
Differential revision: https://reviews.llvm.org/D58165
llvm-svn: 353965
Diffstat (limited to 'clang/lib/Headers/unwind.h')
| -rw-r--r-- | clang/lib/Headers/unwind.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Headers/unwind.h b/clang/lib/Headers/unwind.h index 0e8317e5b9d..438f91446ae 100644 --- a/clang/lib/Headers/unwind.h +++ b/clang/lib/Headers/unwind.h @@ -66,8 +66,8 @@ extern "C" { #pragma GCC visibility push(default) #endif -typedef uintptr_t _Unwind_Word; -typedef intptr_t _Unwind_Sword; +typedef uintptr_t _Unwind_Word __attribute__((__mode__(__unwind_word__))); +typedef intptr_t _Unwind_Sword __attribute__((__mode__(__unwind_word__))); typedef uintptr_t _Unwind_Ptr; typedef uintptr_t _Unwind_Internal_Ptr; typedef uint64_t _Unwind_Exception_Class; |

