summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/Targets/Mips.h
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2019-02-13 18:27:09 +0000
committerSimon Atanasyan <simon@atanasyan.com>2019-02-13 18:27:09 +0000
commit4c22a574140c799117d340d803c2ae0468ca3b86 (patch)
treea9533b18f4aeadb4c8188b77c815c9ad797f5ef5 /clang/lib/Basic/Targets/Mips.h
parent430d294f0b845c6fee710f5b5c33008ebe06ec69 (diff)
downloadbcm5719-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/Basic/Targets/Mips.h')
-rw-r--r--clang/lib/Basic/Targets/Mips.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Basic/Targets/Mips.h b/clang/lib/Basic/Targets/Mips.h
index ca0a5bf5965..474cda84a40 100644
--- a/clang/lib/Basic/Targets/Mips.h
+++ b/clang/lib/Basic/Targets/Mips.h
@@ -401,6 +401,8 @@ public:
return (ABI == "n32" || ABI == "n64") || getTargetOpts().ForceEnableInt128;
}
+ unsigned getUnwindWordWidth() const override;
+
bool validateTarget(DiagnosticsEngine &Diags) const override;
};
} // namespace targets
OpenPOWER on IntegriCloud