// Visit all the compile units again to map the type references.
SmallDenseMap<const MDString *, const DIType *, 32> TypeRefs;
for (auto *CU : CUs->operands())
- if (auto Ts = cast<DICompileUnit>(CU)->getRetainedTypes())
- for (DIType *Op : Ts)
- if (auto *T = dyn_cast_or_null<DICompositeType>(Op))
- if (auto *S = T->getRawIdentifier()) {
- UnresolvedTypeRefs.erase(S);
- TypeRefs.insert(std::make_pair(S, T));
- }
+ if (isa<DICompileUnit>(CU))
+ if (auto Ts = cast<DICompileUnit>(CU)->getRetainedTypes())
+ for (DIType *Op : Ts)
+ if (auto *T = dyn_cast_or_null<DICompositeType>(Op))
+ if (auto *S = T->getRawIdentifier()) {
+ UnresolvedTypeRefs.erase(S);
+ TypeRefs.insert(std::make_pair(S, T));
+ }
// Verify debug info intrinsic bit piece expressions. This needs a second
// pass through the intructions, since we haven't built TypeRefs yet when
--- /dev/null
+; RUN: not llvm-as -disable-output <%s 2>&1 | FileCheck %s
+; CHECK: assembly parsed, but does not verify
+
+!llvm.module.flags = !{!0}
+!llvm.dbg.cu = !{!1}
+
+!0 = !{i32 2, !"Debug Info Version", i32 3}
+!1 = !DIFile(filename: "davide.f", directory: "")