[PATCH] D54662: [WebAssembly] Add equality comparison operators for WasmEventType

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 18 03:56:33 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL347154: [WebAssembly] Add equality comparison operators for WasmEventType (authored by aheejin, committed by ).

Repository:
  rL LLVM

https://reviews.llvm.org/D54662

Files:
  llvm/trunk/include/llvm/BinaryFormat/Wasm.h


Index: llvm/trunk/include/llvm/BinaryFormat/Wasm.h
===================================================================
--- llvm/trunk/include/llvm/BinaryFormat/Wasm.h
+++ llvm/trunk/include/llvm/BinaryFormat/Wasm.h
@@ -331,6 +331,14 @@
   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);
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54662.174531.patch
Type: text/x-patch
Size: 630 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181118/d3916670/attachment.bin>


More information about the llvm-commits mailing list