Files
swift-mirror/test/DebugInfo/InlineBridgingHeader.swift
Adrian Prantl fa32b72806 Debug Info: Establish a default ordering for compile units.
Because the swift compiler relies on Clang to setup the Module,
the clang CU is always created first.  Several dwarf-reading
tools (older versions of ld64, and lldb) can get confused if the
first CU in an object is empty, so ensure that the Swift CU comes
first by rearranging the list of CUs in the LLVM module.

rdar://problem/23434643
2015-11-06 15:49:44 -08:00

14 lines
473 B
Swift

// RUN: %target-swift-frontend \
// RUN: -import-objc-header %S/Inputs/InlineBridgingHeader.h \
// RUN: -emit-ir -g %s -o - | FileCheck %s
// REQUIRES: objc_interop
// The Swift CU must come first.
// CHECK: !llvm.dbg.cu = !{![[SWIFT_CU:[0-9]+]], ![[CLANG_CU:[0-9]+]]}
// CHECK: ![[SWIFT_CU]] = distinct !DICompileUnit(language: DW_LANG_Swift
// CHECK: ![[CLANG_CU]] = distinct !DICompileUnit(language: DW_LANG_ObjC
// CHECK: DISubprogram(
// CHECK-SAME: "Foo"
Foo()