Skip to content

Commit c233ee9

Browse files
committed
Make VerifySDNode a member function
1 parent 4b2c60b commit c233ee9

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

llvm/include/llvm/CodeGen/SelectionDAG.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2450,6 +2450,9 @@ class SelectionDAG {
24502450
const SDLoc &DLoc);
24512451

24522452
private:
2453+
#ifndef NDEBUG
2454+
void verifyNode(SDNode *N) const;
2455+
#endif
24532456
void InsertNode(SDNode *N);
24542457
bool RemoveNodeFromCSEMaps(SDNode *N);
24552458
void AddModifiedNodeToCSEMaps(SDNode *N);

llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,11 +1155,11 @@ void SelectionDAG::DeallocateNode(SDNode *N) {
11551155

11561156
#ifndef NDEBUG
11571157
/// VerifySDNode - Check the given SDNode. Aborts if it is invalid.
1158-
static void VerifySDNode(const SelectionDAG &DAG, SDNode *N) {
1158+
void SelectionDAG::verifyNode(SDNode *N) const {
11591159
switch (N->getOpcode()) {
11601160
default:
11611161
if (N->isTargetOpcode())
1162-
DAG.getSelectionDAGInfo().verifyTargetNode(DAG, N);
1162+
getSelectionDAGInfo().verifyTargetNode(*this, N);
11631163
break;
11641164
case ISD::BUILD_PAIR: {
11651165
EVT VT = N->getValueType(0);
@@ -1203,7 +1203,7 @@ void SelectionDAG::InsertNode(SDNode *N) {
12031203
AllNodes.push_back(N);
12041204
#ifndef NDEBUG
12051205
N->PersistentId = NextPersistentId++;
1206-
VerifySDNode(*this, N);
1206+
verifyNode(N);
12071207
#endif
12081208
for (DAGUpdateListener *DUL = UpdateListeners; DUL; DUL = DUL->Next)
12091209
DUL->NodeInserted(N);

0 commit comments

Comments
 (0)