Skip to content

Commit 3c6894f

Browse files
author
joaosaffran
committed
adding few more tests
1 parent b0d0180 commit 3c6894f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

llvm/lib/Target/DirectX/DXILRootSignature.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,16 @@ analyzeModule(Module &M) {
150150
continue;
151151
}
152152

153-
MDNode *RootElementListNode =
154-
dyn_cast<MDNode>(RSDefNode->getOperand(1).get());
153+
Metadata *RootElementListOperand = RSDefNode->getOperand(1).get();
155154

155+
if (RootElementListOperand == nullptr) {
156+
reportError(Ctx, "Root Element mdnode is null.");
157+
continue;
158+
}
159+
160+
MDNode *RootElementListNode = dyn_cast<MDNode>(RootElementListOperand);
156161
if (RootElementListNode == nullptr) {
157-
reportError(Ctx, "Missing Root Element List Metadata node.");
162+
reportError(Ctx, "Root Element is not a metadata node.");
158163
continue;
159164
}
160165

0 commit comments

Comments
 (0)