llvm.org GIT mirror llvm / cbafae6
Debug Info: clean up usage of Verify. No functionality change. It should suffice to check the type of a debug info metadata, instead of calling Verify. For cases where we know the type of a DI metadata, use assert. Also update testing cases to make them conform to the format of DI classes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185135 91177308-0d34-0410-b5e6-96231b3b80d8 Manman Ren 6 years ago
17 changed file(s) with 78 addition(s) and 35 deletion(s). Raw diff Collapse all Expand all
14101410 const LLVMContext &Ctx = MF->getFunction()->getContext();
14111411 if (!DL.isUnknown()) { // Print source line info.
14121412 DIScope Scope(DL.getScope(Ctx));
1413 assert((!Scope || Scope.isScope()) &&
1414 "Scope of a DebugLoc should be null or a DIScope.");
14131415 // Omit the directory, because it's likely to be long and uninteresting.
1414 if (Scope.Verify())
1416 if (Scope)
14151417 CommentOS << Scope.getFilename();
14161418 else
14171419 CommentOS << "";
599599
600600 case Intrinsic::dbg_declare: {
601601 const DbgDeclareInst *DI = cast(Call);
602 if (!DIVariable(DI->getVariable()).Verify() ||
602 DIVariable DIVar(DI->getVariable());
603 assert((!DIVar || DIVar.isVariable()) &&
604 "Variable in DbgDeclareInst should be either null or a DIVariable.");
605 if (!DIVar ||
603606 !FuncInfo.MF->getMMI().hasDebugInfo()) {
604607 DEBUG(dbgs() << "Dropping debug info for " << *DI << "\n");
605608 return true;
111111 // in a predictable order.
112112 if (const DbgDeclareInst *DI = dyn_cast(I)) {
113113 MachineModuleInfo &MMI = MF->getMMI();
114 DIVariable DIVar(DI->getVariable());
115 assert((!DIVar || DIVar.isVariable()) &&
116 "Variable in DbgDeclareInst should be either null or a DIVariable.");
114117 if (MMI.hasDebugInfo() &&
115 DIVariable(DI->getVariable()).Verify() &&
118 DIVar &&
116119 !DI->getDebugLoc().isUnknown()) {
117120 // Don't handle byval struct arguments or VLAs, for example.
118121 // Non-byval arguments are handled here (they refer to the stack
45364536 const DbgDeclareInst &DI = cast(I);
45374537 MDNode *Variable = DI.getVariable();
45384538 const Value *Address = DI.getAddress();
4539 if (!Address || !DIVariable(Variable).Verify()) {
4539 DIVariable DIVar(Variable);
4540 assert((!DIVar || DIVar.isVariable()) &&
4541 "Variable in DbgDeclareInst should be either null or a DIVariable.");
4542 if (!Address || !DIVar) {
45404543 DEBUG(dbgs() << "Dropping debug info for " << DI << "\n");
45414544 return 0;
45424545 }
46114614 }
46124615 case Intrinsic::dbg_value: {
46134616 const DbgValueInst &DI = cast(I);
4614 if (!DIVariable(DI.getVariable()).Verify())
4617 DIVariable DIVar(DI.getVariable());
4618 assert((!DIVar || DIVar.isVariable()) &&
4619 "Variable in DbgValueInst should be either null or a DIVariable.");
4620 if (!DIVar)
46154621 return 0;
46164622
46174623 MDNode *Variable = DI.getVariable();
499499 DIScope
500500 Scope(dl.getScope(G->getMachineFunction().getFunction()->getContext()));
501501 OS << " dbg:";
502 assert((!Scope || Scope.isScope()) &&
503 "Scope of a DebugLoc should be null or a DIScope.");
502504 // Omit the directory, since it's usually long and uninteresting.
503 if (Scope.Verify())
505 if (Scope)
504506 OS << Scope.getFilename();
505507 else
506508 OS << "";
278278 const LLVMContext &ctx = MF->getFunction()->getContext();
279279 DIScope Scope(curLoc.getScope(ctx));
280280
281 if (!Scope.Verify())
282 return;
281 assert((!Scope || Scope.isScope()) &&
282 "Scope of a DebugLoc should be null or a DIScope.");
283 if (!Scope)
284 return;
283285
284286 StringRef fileName(Scope.getFilename());
285287 StringRef dirName(Scope.getDirectory());
210210 for (unsigned SPIndex = 0, SPNum = SPs.getNumElements();
211211 SPIndex < SPNum; ++SPIndex) {
212212 DISubprogram SP(SPs.getElement(SPIndex));
213 if (!SP.Verify())
213 assert((!SP || SP.isSubprogram()) &&
214 "A MDNode in subprograms of a CU should be null or a DISubprogram.");
215 if (!SP)
214216 continue;
215217 if (Function *F = SP.getFunction())
216218 FunctionDIs[F] = SP;
343343 if (NamedMDNode *NMD = M.getNamedMetadata("llvm.dbg.gv")) {
344344 SmallVector MDs;
345345 for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i)
346 if (DIGlobalVariable(NMD->getOperand(i)).Verify())
346 if (NMD->getOperand(i)) {
347 assert(DIGlobalVariable(NMD->getOperand(i)).isGlobalVariable() &&
348 "A MDNode in llvm.dbg.gv should be a DIGlobalVariable.");
347349 MDs.push_back(NMD->getOperand(i));
350 }
348351 else
349352 Changed = true;
350353 NMD->eraseFromParent();
367370 if (NamedMDNode *NMD = M.getNamedMetadata("llvm.dbg.sp")) {
368371 SmallVector MDs;
369372 for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i)
370 if (DISubprogram(NMD->getOperand(i)).Verify())
373 if (NMD->getOperand(i)) {
374 assert(DISubprogram(NMD->getOperand(i)).isSubprogram() &&
375 "A MDNode in llvm.dbg.sp should be a DISubprogram.");
371376 MDs.push_back(NMD->getOperand(i));
377 }
372378 else
373379 Changed = true;
374380 NMD->eraseFromParent();
433433 DIArray SPs = CU.getSubprograms();
434434 for (unsigned i = 0, e = SPs.getNumElements(); i != e; ++i) {
435435 DISubprogram SP(SPs.getElement(i));
436 if (!SP.Verify()) continue;
436 assert((!SP || SP.isSubprogram()) &&
437 "A MDNode in subprograms of a CU should be null or a DISubprogram.");
438 if (!SP)
439 continue;
437440
438441 Function *F = SP.getFunction();
439442 if (!F) continue;
482485 SmallVector, 8> CountersBySP;
483486 for (unsigned i = 0, e = SPs.getNumElements(); i != e; ++i) {
484487 DISubprogram SP(SPs.getElement(i));
485 if (!SP.Verify()) continue;
488 assert((!SP || SP.isSubprogram()) &&
489 "A MDNode in subprograms of a CU should be null or a DISubprogram.");
490 if (!SP)
491 continue;
486492 Function *F = SP.getFunction();
487493 if (!F) continue;
488494 if (!Result) Result = true;
853853 bool llvm::ConvertDebugDeclareToDebugValue(DbgDeclareInst *DDI,
854854 StoreInst *SI, DIBuilder &Builder) {
855855 DIVariable DIVar(DDI->getVariable());
856 if (!DIVar.Verify())
856 assert((!DIVar || DIVar.isVariable()) &&
857 "Variable in DbgDeclareInst should be either null or a DIVariable.");
858 if (!DIVar)
857859 return false;
858860
859861 if (LdStHasDebugValue(DIVar, SI))
887889 bool llvm::ConvertDebugDeclareToDebugValue(DbgDeclareInst *DDI,
888890 LoadInst *LI, DIBuilder &Builder) {
889891 DIVariable DIVar(DDI->getVariable());
890 if (!DIVar.Verify())
892 assert((!DIVar || DIVar.isVariable()) &&
893 "Variable in DbgDeclareInst should be either null or a DIVariable.");
894 if (!DIVar)
891895 return false;
892896
893897 if (LdStHasDebugValue(DIVar, LI))
960964 if (!DDI)
961965 return false;
962966 DIVariable DIVar(DDI->getVariable());
963 if (!DIVar.Verify())
967 assert((!DIVar || DIVar.isVariable()) &&
968 "Variable in DbgDeclareInst should be either null or a DIVariable.");
969 if (!DIVar)
964970 return false;
965971
966972 // Create a copy of the original DIDescriptor for user variable, appending
7575
7676 !llvm.dbg.cu = !{!3}
7777
78 !0 = metadata !{i32 786478, metadata !1, metadata !"SVal", metadata !"SVal", metadata !"", metadata !2, i32 11, metadata !14, i1 false, i1 false, i32 0, i32 0, null, i1 false, i1 false, null} ; [ DW_TAG_subprogram ]
79 !1 = metadata !{i32 786451, metadata !2, metadata !"SVal", metadata !2, i32 1, i64 128, i64 64, i64 0, i32 0, null, metadata !4, i32 0, null} ; [ DW_TAG_structure_type ]
78 !0 = metadata !{i32 786478, metadata !48, metadata !1, metadata !"SVal", metadata !"SVal", metadata !"", i32 11, metadata !14, i1 false, i1 false, i32 0, i32 0, null, i1 false, i1 false, null} ; [ DW_TAG_subprogram ]
79 !1 = metadata !{i32 786451, metadata !48, metadata !"SVal", metadata !2, i32 1, i64 128, i64 64, i64 0, i32 0, null, metadata !4, i32 0, null} ; [ DW_TAG_structure_type ]
8080 !2 = metadata !{i32 786473, metadata !48} ; [ DW_TAG_file_type ]
8181 !3 = metadata !{i32 786449, i32 4, metadata !2, metadata !"4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", i1 false, metadata !"", i32 0, metadata !47, metadata !47, metadata !46, metadata !47, metadata !47, metadata !""} ; [ DW_TAG_compile_unit ]
8282 !4 = metadata !{metadata !5, metadata !7, metadata !0, metadata !9}
8484 !6 = metadata !{i32 786447, metadata !2, metadata !"", metadata !2, i32 0, i64 64, i64 64, i64 0, i32 0, null} ; [ DW_TAG_pointer_type ]
8585 !7 = metadata !{i32 786445, metadata !1, metadata !"Kind", metadata !2, i32 8, i64 32, i64 32, i64 64, i32 0, metadata !8} ; [ DW_TAG_member ]
8686 !8 = metadata !{i32 786468, metadata !2, metadata !"unsigned int", metadata !2, i32 0, i64 32, i64 32, i64 0, i32 0, i32 7} ; [ DW_TAG_base_type ]
87 !9 = metadata !{i32 786478, metadata !1, metadata !"~SVal", metadata !"~SVal", metadata !"", metadata !2, i32 12, metadata !10, i1 false, i1 false, i32 0, i32 0, null, i1 false, i1 false, null} ; [ DW_TAG_subprogram ]
87 !9 = metadata !{i32 786478, metadata !48, metadata !1, metadata !"~SVal", metadata !"~SVal", metadata !"", i32 12, metadata !10, i1 false, i1 false, i32 0, i32 0, null, i1 false, i1 false, null} ; [ DW_TAG_subprogram ]
8888 !10 = metadata !{i32 786453, metadata !2, metadata !"", metadata !2, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !11, i32 0, null} ; [ DW_TAG_subroutine_type ]
8989 !11 = metadata !{null, metadata !12, metadata !13}
9090 !12 = metadata !{i32 786447, metadata !2, metadata !"", metadata !2, i32 0, i64 64, i64 64, i64 0, i32 64, metadata !1} ; [ DW_TAG_pointer_type ]
9191 !13 = metadata !{i32 786468, metadata !2, metadata !"int", metadata !2, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ]
9292 !14 = metadata !{i32 786453, metadata !2, metadata !"", metadata !2, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !15, i32 0, null} ; [ DW_TAG_subroutine_type ]
9393 !15 = metadata !{null, metadata !12}
94 !16 = metadata !{i32 786478, metadata !1, metadata !"SVal", metadata !"SVal", metadata !"_ZN4SValC1Ev", metadata !2, i32 11, metadata !14, i1 false, i1 true, i32 0, i32 0, null, i1 false, i1 false, void (%struct.SVal*)* @_ZN4SValC1Ev} ; [ DW_TAG_subprogram ]
94 !16 = metadata !{i32 786478, metadata !48, metadata !1, metadata !"SVal", metadata !"SVal", metadata !"_ZN4SValC1Ev", i32 11, metadata !14, i1 false, i1 true, i32 0, i32 0, null, i1 false, i1 false, void (%struct.SVal*)* @_ZN4SValC1Ev} ; [ DW_TAG_subprogram ]
9595 !17 = metadata !{i32 786478, metadata !2, metadata !"foo", metadata !"foo", metadata !"_Z3fooi4SVal", metadata !2, i32 16, metadata !18, i1 false, i1 true, i32 0, i32 0, null, i1 false, i1 false, i32 (i32, %struct.SVal*)* @_Z3fooi4SVal} ; [ DW_TAG_subprogram ]
9696 !18 = metadata !{i32 786453, metadata !2, metadata !"", metadata !2, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !19, i32 0, null} ; [ DW_TAG_subroutine_type ]
9797 !19 = metadata !{metadata !13, metadata !13, metadata !1}
99
1010 declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone
1111
12 !0 = metadata !{i32 0} ;
12 ; !0 should conform to the format of DIVariable.
13 !0 = metadata !{i32 786689, null, metadata !"a", null, i32 0, null, i32 0, i32 0} ;
7676 !llvm.dbg.cu = !{!3}
7777 !46 = metadata !{metadata !0, metadata !9, metadata !16, metadata !17, metadata !20}
7878
79 !0 = metadata !{i32 786478, metadata !1, metadata !"SVal", metadata !"SVal", metadata !"", metadata !2, i32 11, metadata !14, i1 false, i1 false, i32 0, i32 0, null, i1 false, i1 false, null, null, null, null, i32 11} ; [ DW_TAG_subprogram ]
80 !1 = metadata !{i32 786451, metadata !2, metadata !"SVal", metadata !2, i32 1, i64 128, i64 64, i64 0, i32 0, null, metadata !4, i32 0, null} ; [ DW_TAG_structure_type ]
79 !0 = metadata !{i32 786478, metadata !47, metadata !1, metadata !"SVal", metadata !"SVal", metadata !"", i32 11, metadata !14, i1 false, i1 false, i32 0, i32 0, null, i1 false, i1 false, null, null, null, null, i32 11} ; [ DW_TAG_subprogram ]
80 !1 = metadata !{i32 786451, metadata !47, metadata !"SVal", metadata !2, i32 1, i64 128, i64 64, i64 0, i32 0, null, metadata !4, i32 0, null} ; [ DW_TAG_structure_type ]
8181 !2 = metadata !{i32 786473, metadata !"small.cc", metadata !"/Users/manav/R8248330", metadata !3} ; [ DW_TAG_file_type ]
8282 !3 = metadata !{i32 786449, i32 4, metadata !2, metadata !"4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", i1 false, metadata !"", i32 0, null, null, metadata !46, null, null, metadata !""} ; [ DW_TAG_compile_unit ]
8383 !4 = metadata !{metadata !5, metadata !7, metadata !0, metadata !9}
8585 !6 = metadata !{i32 786447, metadata !2, metadata !"", metadata !2, i32 0, i64 64, i64 64, i64 0, i32 0, null} ; [ DW_TAG_pointer_type ]
8686 !7 = metadata !{i32 786445, metadata !1, metadata !"Kind", metadata !2, i32 8, i64 32, i64 32, i64 64, i32 0, metadata !8} ; [ DW_TAG_member ]
8787 !8 = metadata !{i32 786468, metadata !2, metadata !"unsigned int", metadata !2, i32 0, i64 32, i64 32, i64 0, i32 0, i32 7} ; [ DW_TAG_base_type ]
88 !9 = metadata !{i32 786478, metadata !1, metadata !"~SVal", metadata !"~SVal", metadata !"", metadata !2, i32 12, metadata !10, i1 false, i1 false, i32 0, i32 0, null, i1 false, i1 false, null, null, null, null, i32 12} ; [ DW_TAG_subprogram ]
88 !9 = metadata !{i32 786478, metadata !47, metadata !1, metadata !"~SVal", metadata !"~SVal", metadata !"", i32 12, metadata !10, i1 false, i1 false, i32 0, i32 0, null, i1 false, i1 false, null, null, null, null, i32 12} ; [ DW_TAG_subprogram ]
8989 !10 = metadata !{i32 786453, metadata !2, metadata !"", metadata !2, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !11, i32 0, null} ; [ DW_TAG_subroutine_type ]
9090 !11 = metadata !{null, metadata !12, metadata !13}
9191 !12 = metadata !{i32 786447, metadata !2, metadata !"", metadata !2, i32 0, i64 64, i64 64, i64 0, i32 64, metadata !1} ; [ DW_TAG_pointer_type ]
9292 !13 = metadata !{i32 786468, metadata !2, metadata !"int", metadata !2, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ]
9393 !14 = metadata !{i32 786453, metadata !2, metadata !"", metadata !2, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !15, i32 0, null} ; [ DW_TAG_subroutine_type ]
9494 !15 = metadata !{null, metadata !12}
95 !16 = metadata !{i32 786478, metadata !1, metadata !"SVal", metadata !"SVal", metadata !"_ZN4SValC1Ev", metadata !2, i32 11, metadata !14, i1 false, i1 true, i32 0, i32 0, null, i1 false, i1 false, void (%struct.SVal*)* @_ZN4SValC1Ev, null, null, null, i32 11} ; [ DW_TAG_subprogram ]
95 !16 = metadata !{i32 786478, metadata !47, metadata !1, metadata !"SVal", metadata !"SVal", metadata !"_ZN4SValC1Ev", i32 11, metadata !14, i1 false, i1 true, i32 0, i32 0, null, i1 false, i1 false, void (%struct.SVal*)* @_ZN4SValC1Ev, null, null, null, i32 11} ; [ DW_TAG_subprogram ]
9696 !17 = metadata !{i32 786478, metadata !2, metadata !"foo", metadata !"foo", metadata !"_Z3fooi4SVal", metadata !2, i32 16, metadata !18, i1 false, i1 true, i32 0, i32 0, null, i1 false, i1 false, i32 (i32, %struct.SVal*)* @_Z3fooi4SVal, null, null, null, i32 16} ; [ DW_TAG_subprogram ]
9797 !18 = metadata !{i32 786453, metadata !2, metadata !"", metadata !2, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !19, i32 0, null} ; [ DW_TAG_subroutine_type ]
9898 !19 = metadata !{metadata !13, metadata !13, metadata !1}
122122 !43 = metadata !{i32 26, i32 0, metadata !39, null}
123123 !44 = metadata !{i32 786688, metadata !39, metadata !"k", metadata !2, i32 26, metadata !13, i32 0, null} ; [ DW_TAG_auto_variable ]
124124 !45 = metadata !{i32 27, i32 0, metadata !39, null}
125 !47 = metadata !{metadata !"small.cc", metadata !"/Users/manav/R8248330"}
4949 !9 = metadata !{i32 786451, metadata !26, metadata !4, metadata !"S", i32 2, i64 8, i64 8, i64 0, i32 0, null, metadata !11, i32 0, null} ; [ DW_TAG_structure_type ]
5050 !10 = metadata !{i32 786473, metadata !26} ; [ DW_TAG_file_type ]
5151 !11 = metadata !{metadata !12}
52 !12 = metadata !{i32 786478, metadata !10, metadata !9, metadata !"foo", metadata !"foo", metadata !"_ZN1S3fooEv", i32 3, metadata !13, i1 false, i1 true, i32 0, i32 0, null, i1 false, i32 (%struct.S*)* @_ZN1S3fooEv, null, null, null, i32 3} ; [ DW_TAG_subprogram ]
53 !13 = metadata !{i32 786453, metadata !25, metadata !4, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !14, i32 0, null} ; [ DW_TAG_subroutine_type ]
52 !12 = metadata !{i32 786478, metadata !26, metadata !9, metadata !"foo", metadata !"foo", metadata !"_ZN1S3fooEv", i32 3, metadata !13, i1 false, i1 true, i32 0, i32 0, null, i32 0, i1 false, i32 (%struct.S*)* @_ZN1S3fooEv, null, null, null, i32 3} ; [ DW_TAG_subprogram ]
53 !13 = metadata !{i32 786453, metadata !25, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !14, i32 0, null} ; [ DW_TAG_subroutine_type ]
5454 !14 = metadata !{metadata !8, metadata !15}
5555 !15 = metadata !{i32 786447, metadata !25, metadata !4, metadata !"", i32 0, i64 64, i64 64, i64 0, i32 64, metadata !9} ; [ DW_TAG_pointer_type ]
5656 !16 = metadata !{i32 3, i32 0, metadata !1, null}
121121 !34 = metadata !{i32 720932, null, null, metadata !"char", i32 0, i64 8, i64 8, i64 0, i32 0, i32 6} ; [ DW_TAG_base_type ]
122122 !35 = metadata !{metadata !36}
123123 !36 = metadata !{i32 720932} ; [ DW_TAG_base_type ]
124 !37 = metadata !{i32 720942, metadata !6, null, metadata !"bar", metadata !"bar", metadata !"_ZN3barC1Ei", i32 13, metadata !22, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 false, void (%struct.bar*, i32)* @_ZN3barC1Ei, null, metadata !21, metadata !38} ; [ DW_TAG_subprogram ]
124 !37 = metadata !{i32 720942, metadata !6, null, metadata !"bar", metadata !"bar", metadata !"_ZN3barC1Ei", i32 13, metadata !22, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 false, void (%struct.bar*, i32)* @_ZN3barC1Ei, null, metadata !21, metadata !38, i32 0} ; [ DW_TAG_subprogram ]
125125 !38 = metadata !{metadata !39}
126126 !39 = metadata !{i32 720932} ; [ DW_TAG_base_type ]
127 !40 = metadata !{i32 720942, metadata !6, null, metadata !"bar", metadata !"bar", metadata !"_ZN3barC2Ei", i32 13, metadata !22, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 false, void (%struct.bar*, i32)* @_ZN3barC2Ei, null, metadata !21, metadata !41} ; [ DW_TAG_subprogram ]
127 !40 = metadata !{i32 720942, metadata !6, null, metadata !"bar", metadata !"bar", metadata !"_ZN3barC2Ei", i32 13, metadata !22, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 false, void (%struct.bar*, i32)* @_ZN3barC2Ei, null, metadata !21, metadata !41, i32 0} ; [ DW_TAG_subprogram ]
128128 !41 = metadata !{metadata !42}
129129 !42 = metadata !{i32 720932} ; [ DW_TAG_base_type ]
130 !43 = metadata !{i32 720942, metadata !6, null, metadata !"baz", metadata !"baz", metadata !"_ZN3bazC1Ei", i32 6, metadata !14, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 false, void (%struct.baz*, i32)* @_ZN3bazC1Ei, null, metadata !13, metadata !44} ; [ DW_TAG_subprogram ]
130 !43 = metadata !{i32 720942, metadata !6, null, metadata !"baz", metadata !"baz", metadata !"_ZN3bazC1Ei", i32 6, metadata !14, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 false, void (%struct.baz*, i32)* @_ZN3bazC1Ei, null, metadata !13, metadata !44, i32 0} ; [ DW_TAG_subprogram ]
131131 !44 = metadata !{metadata !45}
132132 !45 = metadata !{i32 720932} ; [ DW_TAG_base_type ]
133 !46 = metadata !{i32 720942, metadata !6, null, metadata !"baz", metadata !"baz", metadata !"_ZN3bazC2Ei", i32 6, metadata !14, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 false, void (%struct.baz*, i32)* @_ZN3bazC2Ei, null, metadata !13, metadata !47} ; [ DW_TAG_subprogram ]
133 !46 = metadata !{i32 720942, metadata !6, null, metadata !"baz", metadata !"baz", metadata !"_ZN3bazC2Ei", i32 6, metadata !14, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 false, void (%struct.baz*, i32)* @_ZN3bazC2Ei, null, metadata !13, metadata !47, i32 0} ; [ DW_TAG_subprogram ]
134134 !47 = metadata !{metadata !48}
135135 !48 = metadata !{i32 720932} ; [ DW_TAG_base_type ]
136136 !49 = metadata !{i32 721153, metadata !29, metadata !"argc", metadata !6, i32 16777232, metadata !12, i32 0, i32 0} ; [ DW_TAG_arg_variable ]
3939 !7 = metadata !{i32 786689, metadata !1, metadata !"__val", metadata !2, i32 33554510, metadata !8, i32 0, null} ; [ DW_TAG_arg_variable ]
4040 !8 = metadata !{i32 786468, metadata !3, metadata !"int", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ]
4141 !9 = metadata !{i32 786689, metadata !1, metadata !"__len", metadata !2, i32 50331726, metadata !10, i32 0, null} ; [ DW_TAG_arg_variable ]
42 !10 = metadata !{i32 589846, metadata !2, metadata !3, metadata !"size_t", i32 80, i64 0, i64 0, i64 0, i32 0, metadata !11} ; [ DW_TAG_typedef ]
43 !11 = metadata !{i32 589846, metadata !2, metadata !3, metadata !"__darwin_size_t", i32 90, i64 0, i64 0, i64 0, i32 0, metadata !12} ; [ DW_TAG_typedef ]
42 !10 = metadata !{i32 589846, metadata !27, metadata !3, metadata !"size_t", i32 80, i64 0, i64 0, i64 0, i32 0, metadata !11} ; [ DW_TAG_typedef ]
43 !11 = metadata !{i32 589846, metadata !27, metadata !3, metadata !"__darwin_size_t", i32 90, i64 0, i64 0, i64 0, i32 0, metadata !12} ; [ DW_TAG_typedef ]
4444 !12 = metadata !{i32 786468, metadata !3, metadata !"long unsigned int", null, i32 0, i64 64, i64 64, i64 0, i32 0, i32 7} ; [ DW_TAG_base_type ]
4545 !16 = metadata !{i32 78, i32 28, metadata !1, null}
4646 !18 = metadata !{i32 78, i32 40, metadata !1, null}
388388 for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) {
389389 std::string Name;
390390 DISubprogram SP(NMD->getOperand(i));
391 if (SP.Verify())
392 getContextName(SP.getContext(), Name);
391 assert((!SP || SP.isSubprogram()) &&
392 "A MDNode in llvm.dbg.sp should be null or a DISubprogram.");
393 if (!SP)
394 continue;
395 getContextName(SP.getContext(), Name);
393396 Name = Name + SP.getDisplayName().str();
394397 if (!Name.empty() && Processed.insert(Name)) {
395398 Out << Name << "\n";