Skip to content

Commit 95ea3dd

Browse files
committed
DebugTypeExtRefs=false when DisableClangModuleSkeletonCUs=true
1 parent 85891fd commit 95ea3dd

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

lib/IRGen/IRGenModule.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ static clang::CodeGenerator *createClangCodeGenerator(ASTContext &Context,
113113
break;
114114
case IRGenDebugInfoLevel::ASTTypes:
115115
case IRGenDebugInfoLevel::DwarfTypes:
116-
CGO.DebugTypeExtRefs = true;
116+
CGO.DebugTypeExtRefs = !Opts.DisableClangModuleSkeletonCUs;
117117
CGO.setDebugInfo(clang::codegenoptions::DebugInfoKind::FullDebugInfo);
118118
break;
119119
}

test/DebugInfo/ClangModuleBreadcrumbs.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
import ClangModule.SubModule
88
import OtherClangModule.SubModule
99

10+
let _ = someFunc(0)
11+
1012
// Check for Clang module breadcrumbs.
1113
// CHECK: !DICompileUnit(language: DW_LANG_{{ObjC|C99}},{{.*}} producer: "{{.*}}Swift
1214
// CHECK-SAME: ClangModule
@@ -16,5 +18,9 @@ import OtherClangModule.SubModule
1618
// CHECK-SAME: OtherClangModule
1719
// CHECK-SAME: dwoId:
1820

21+
// CHECK: !DICompileUnit(language: DW_LANG_{{ObjC|C99}},{{.*}} producer: "{{.*}}clang
22+
// CHECK-SAME: ClangModule
23+
// CHECK-SAME: dwoId:
24+
1925
// NONE: DICompileUnit({{.*}}
2026
// NONE-NOT: DICompileUnit({{.*}}ClangModule

test/DebugInfo/Inputs/ClangModule.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
struct Foo {};
22

33
typedef struct Foo s_Foo;
4+
5+
static __inline__ __attribute__((always_inline)) int someFunc(int x) { return x; }

0 commit comments

Comments
 (0)