Skip to content

Commit 75f12d2

Browse files
authored
Merge pull request #62 from schweitzpgi/release_70
Patches from ARM.
2 parents 84335cd + 5d97d45 commit 75f12d2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ DIE *DwarfCompileUnit::getOrCreateGlobalVariableDIE(
240240

241241
// Construct the context before querying for the existence of the DIE in
242242
// case such construction creates the DIE.
243-
auto *CB = dyn_cast<DICommonBlock>(GVContext);
243+
auto *CB = GVContext ? dyn_cast<DICommonBlock>(GVContext) : nullptr;
244244
DIE *ContextDIE = CB ? getOrCreateCommonBlock(CB, GlobalExprs)
245245
: getOrCreateContextDIE(GVContext);
246246

test/DebugInfo/X86/DICommonBlock.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ define i32 @subr() !dbg !9 {
2121

2222
!0 = distinct !DICompileUnit(language: DW_LANG_Fortran90, file: !1, producer: "PGI Fortran", isOptimized: false, runtimeVersion: 2, emissionKind: FullDebug, retainedTypes: !14, globals: !2)
2323
!1 = !DIFile(filename: "none.f90", directory: "/not/here/")
24-
!2 = !{}
24+
!2 = !{!13}
2525
!3 = !{}
2626
!4 = !DIGlobalVariable(name: "common /a/", scope: !5, file: !1, line: 4, isLocal: false, isDefinition: true, type: !12)
2727
!5 = !DICommonBlock(scope: !9, declaration: !4, name: "a", file: !1, line: 4)

0 commit comments

Comments
 (0)