Skip to content

Commit d1a79b3

Browse files
author
joaosaffran
committed
addressing PR Comments
1 parent 5a44b62 commit d1a79b3

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

llvm/lib/Target/DirectX/DXILRootSignature.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,9 @@ bool ModuleRootSignature::parse(NamedMDNode *Root) {
9595
signature pair.
9696
*/
9797

98-
for (unsigned int Sid = 0; Sid < Root->getNumOperands(); Sid++) {
99-
MDNode *Node = dyn_cast<MDNode>(Root->getOperand(Sid));
98+
for (const MDNode *Node : Root->operands()) {
10099

101-
if (Node == nullptr || Node->getNumOperands() != 2)
100+
if (Node->getNumOperands() != 2)
102101
return reportError("Invalid format for Root Signature Definition. Pairs "
103102
"of function, root signature expected.");
104103

llvm/lib/Target/DirectX/DXILRootSignature.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ enum class RootSignatureElementKind {
3030
};
3131

3232
struct ModuleRootSignature {
33-
uint32_t Flags;
33+
uint32_t Flags = 0;
3434

3535
ModuleRootSignature() = default;
3636

0 commit comments

Comments
 (0)