@@ -186,20 +186,23 @@ PreservedAnalyses RootSignatureAnalysisPrinter::run(Module &M,
186186 OS << " Root Signature Definitions"
187187 << " \n " ;
188188 uint8_t Space = 0 ;
189- for (const auto &P : RSDMap) {
190- const auto &[Function, RSD] = P;
191- OS << " Definition for '" << Function->getName () << " ':\n " ;
189+ for (const Function &F : M) {
190+ auto It = RSDMap.find (&F);
191+ if (It == RSDMap.end ())
192+ continue ;
193+ const auto &RS = It->second ;
194+ 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