[llvm] [LLVM][TableGen] Change CodeGenDAGPatterns to use const RecordKeeper (PR #108762)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 15 09:19:01 PDT 2024
================
@@ -3198,14 +3198,10 @@ Record *CodeGenDAGPatterns::getSDNodeNamed(StringRef Name) const {
// Parse all of the SDNode definitions for the target, populating SDNodes.
void CodeGenDAGPatterns::ParseNodeInfo() {
- std::vector<Record *> Nodes = Records.getAllDerivedDefinitions("SDNode");
const CodeGenHwModes &CGH = getTargetInfo().getHwModes();
- while (!Nodes.empty()) {
- Record *R = Nodes.back();
+ for (const Record *R : reverse(Records.getAllDerivedDefinitions("SDNode")))
----------------
arsenm wrote:
Is there any particular reason this would need to be done in reverse?
https://github.com/llvm/llvm-project/pull/108762
More information about the llvm-commits
mailing list