[PATCH] D134488: [llvm] Assert two ValIDs are the same kind before comparing
Leonard Chan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 22 15:38:15 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf7d674910d2d: [llvm] Assert two ValIDs are the same kind before comparing (authored by leonardchan).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134488/new/
https://reviews.llvm.org/D134488
Files:
llvm/include/llvm/AsmParser/LLParser.h
Index: llvm/include/llvm/AsmParser/LLParser.h
===================================================================
--- llvm/include/llvm/AsmParser/LLParser.h
+++ llvm/include/llvm/AsmParser/LLParser.h
@@ -81,6 +81,7 @@
}
bool operator<(const ValID &RHS) const {
+ assert(Kind == RHS.Kind && "Comparing ValIDs of different kinds");
if (Kind == t_LocalID || Kind == t_GlobalID)
return UIntVal < RHS.UIntVal;
assert((Kind == t_LocalName || Kind == t_GlobalName ||
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134488.462335.patch
Type: text/x-patch
Size: 500 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220922/cfc9a2a4/attachment.bin>
More information about the llvm-commits
mailing list