diff options
author | Heejin Ahn <aheejin@gmail.com> | 2018-11-18 11:53:35 +0000 |
---|---|---|
committer | Heejin Ahn <aheejin@gmail.com> | 2018-11-18 11:53:35 +0000 |
commit | 7a391ff918d7a68d476c2ea89243dc47b825900f (patch) | |
tree | 7cd7b25d84e08590cdb1fbef2fcaa95fc5fc85d2 /llvm/include/llvm/BinaryFormat/Wasm.h | |
parent | 4ff7769974614a0c4ef576ffa0ab46a58bb3fef4 (diff) | |
download | bcm5719-llvm-7a391ff918d7a68d476c2ea89243dc47b825900f.tar.gz bcm5719-llvm-7a391ff918d7a68d476c2ea89243dc47b825900f.zip |
[WebAssembly] Add equality comparison operators for WasmEventType
Summary:
This was missing in D54096. Independent tests for this is not available
here, because these are used in lld.
Reviewers: sbc100
Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D54662
llvm-svn: 347154
Diffstat (limited to 'llvm/include/llvm/BinaryFormat/Wasm.h')
-rw-r--r-- | llvm/include/llvm/BinaryFormat/Wasm.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/include/llvm/BinaryFormat/Wasm.h b/llvm/include/llvm/BinaryFormat/Wasm.h index c22d3663e98..3f56e23addb 100644 --- a/llvm/include/llvm/BinaryFormat/Wasm.h +++ b/llvm/include/llvm/BinaryFormat/Wasm.h @@ -331,6 +331,14 @@ inline bool operator!=(const WasmGlobalType &LHS, const WasmGlobalType &RHS) { return !(LHS == RHS); } +inline bool operator==(const WasmEventType &LHS, const WasmEventType &RHS) { + return LHS.Attribute == RHS.Attribute && LHS.SigIndex == RHS.SigIndex; +} + +inline bool operator!=(const WasmEventType &LHS, const WasmEventType &RHS) { + return !(LHS == RHS); +} + std::string toString(wasm::WasmSymbolType type); std::string relocTypetoString(uint32_t type); |