Skip to content

Commit bf49a3a

Browse files
author
joaosaffran
committed
adding test for null function
1 parent 0af845c commit bf49a3a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

llvm/lib/Target/DirectX/DXContainerGlobals.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ void DXContainerGlobals::addRootSignature(Module &M,
169169
if (FuncRs == RSA.end())
170170
return;
171171

172-
const RootSignatureDesc &RS = FuncRs->getSecond();
172+
const RootSignatureDesc &RS = FuncRs->second;
173173
SmallString<256> Data;
174174
raw_svector_ostream OS(Data);
175175

llvm/lib/Target/DirectX/DXILRootSignature.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ analyzeModule(Module &M) {
132132
// Function was pruned during compilation.
133133
const MDOperand &FunctionPointerMdNode = RSDefNode->getOperand(0);
134134
if (FunctionPointerMdNode == nullptr) {
135+
reportError(
136+
Ctx, "Function associated with Root Signature definition is null.");
135137
continue;
136138
}
137139

0 commit comments

Comments
 (0)