[PATCH] D103491: [ADT] Move DenseMapInfo for ArrayRef/StringRef into respective headers (NFC)
Chris Lattner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 1 14:54:49 PDT 2021
lattner accepted this revision.
lattner added a comment.
This revision is now accepted and ready to land.
> This required adding quite a few additional includes, as many files were relying on various things pulled in by ArrayRef.h.
This is a _good_ thing btw!
Thank you for driving this!
================
Comment at: llvm/include/llvm/ADT/ArrayRef.h:595-600
+ if (RHS.data() == getEmptyKey().data())
+ return LHS.data() == getEmptyKey().data();
+ if (RHS.data() == getTombstoneKey().data())
+ return LHS.data() == getTombstoneKey().data();
+ return LHS == RHS;
+ }
----------------
I'm pretty sure this method can just be "return LHS == RHS;" The tombstone/empty comparisons should work without special cases.
================
Comment at: llvm/lib/CodeGen/MBFIWrapper.cpp:14
+#include "llvm/ADT/Optional.h"
#include "llvm/CodeGen/MBFIWrapper.h"
----------------
This clang format warning is right, plz move under the other #include
================
Comment at: llvm/lib/Support/SmallPtrSet.cpp:15
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/DenseMapInfo.h"
#include "llvm/Support/MathExtras.h"
----------------
These are also right, plz fix
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103491/new/
https://reviews.llvm.org/D103491
More information about the cfe-commits
mailing list