1// Test that debug info is emitted for an Objective-C module and 2// a precompiled header. 3 4// REQUIRES: asserts, shell 5 6// Modules: 7// RUN: rm -rf %t 8// RUN: %clang_cc1 -x objective-c -fmodules -fmodule-format=obj -fimplicit-module-maps -DMODULES -fmodules-cache-path=%t %s -I %S/Inputs -I %t -emit-llvm -o %t.ll -mllvm -debug-only=pchcontainer &>%t-mod.ll 9// RUN: cat %t-mod.ll | FileCheck %s 10 11// PCH: 12// RUN: %clang_cc1 -x objective-c -emit-pch -fmodule-format=obj -I %S/Inputs -o %t.pch %S/Inputs/DebugObjC.h -mllvm -debug-only=pchcontainer &>%t-pch.ll 13// RUN: cat %t-pch.ll | FileCheck %s 14 15#ifdef MODULES 16@import DebugObjC; 17#endif 18 19// CHECK: distinct !DICompileUnit(language: DW_LANG_ObjC 20// CHECK-SAME: isOptimized: false, 21// CHECK-SAME: splitDebugFilename: 22// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "ObjCClass" 23// CHECK: !DIObjCProperty(name: "property", 24// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "ivar" 25// CHECK: !DISubprogram(name: "+[ObjCClass classMethod]" 26// CHECK: !DISubprogram(name: "-[ObjCClass instanceMethodWithInt:]" 27// CHECK: !DISubprogram(name: "-[ categoryMethod]" 28