[llvm] r347154 - [WebAssembly] Add equality comparison operators for WasmEventType
Heejin Ahn via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 18 03:53:35 PST 2018
Author: aheejin
Date: Sun Nov 18 03:53:35 2018
New Revision: 347154
URL: http://llvm.org/viewvc/llvm-project?rev=347154&view=rev
Log:
[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
Modified:
llvm/trunk/include/llvm/BinaryFormat/Wasm.h
Modified: llvm/trunk/include/llvm/BinaryFormat/Wasm.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/BinaryFormat/Wasm.h?rev=347154&r1=347153&r2=347154&view=diff
==============================================================================
--- llvm/trunk/include/llvm/BinaryFormat/Wasm.h (original)
+++ llvm/trunk/include/llvm/BinaryFormat/Wasm.h Sun Nov 18 03:53:35 2018
@@ -331,6 +331,14 @@ inline bool operator!=(const WasmGlobalT
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);
More information about the llvm-commits
mailing list