Skip to content

Commit fb2aeee

Browse files
author
joaosaffran
committed
addressing comments
1 parent e92d788 commit fb2aeee

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

llvm/lib/Target/DirectX/DXILRootSignature.cpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -187,19 +187,22 @@ PreservedAnalyses RootSignatureAnalysisPrinter::run(Module &M,
187187
<< "\n";
188188
uint8_t Space = 0;
189189
for (const auto &F : M) {
190-
const auto RSD = RSDMap.at(&F);
190+
const auto &RSD = RSDMap.find(&F);
191+
if (RSD == RSDMap.end())
192+
continue;
193+
const auto &RS = RSD->second;
191194
OS << "Definition for '" << F.getName() << "':\n";
192195

193196
// start root signature header
194197
Space++;
195-
OS << indent(Space) << "Flags: " << format_hex(RSD.Flags, 8) << ":\n";
196-
OS << indent(Space) << "Version: " << RSD.Version << ":\n";
197-
OS << indent(Space) << "NumParameters: " << RSD.NumParameters << ":\n";
198-
OS << indent(Space) << "RootParametersOffset: " << RSD.RootParametersOffset
198+
OS << indent(Space) << "Flags: " << format_hex(RS.Flags, 8) << ":\n";
199+
OS << indent(Space) << "Version: " << RS.Version << ":\n";
200+
OS << indent(Space) << "NumParameters: " << RS.NumParameters << ":\n";
201+
OS << indent(Space) << "RootParametersOffset: " << RS.RootParametersOffset
199202
<< ":\n";
200-
OS << indent(Space) << "NumStaticSamplers: " << RSD.NumStaticSamplers
203+
OS << indent(Space) << "NumStaticSamplers: " << RS.NumStaticSamplers
201204
<< ":\n";
202-
OS << indent(Space) << "StaticSamplersOffset: " << RSD.StaticSamplersOffset
205+
OS << indent(Space) << "StaticSamplersOffset: " << RS.StaticSamplersOffset
203206
<< ":\n";
204207
Space--;
205208
// end root signature header

0 commit comments

Comments
 (0)