2015-09-08 19:20:27 +00:00
|
|
|
// Test that (the same) debug info is emitted for an Objective-C++
|
|
|
|
|
// module and a C++ precompiled header.
|
|
|
|
|
|
|
|
|
|
// REQUIRES: asserts, shell
|
|
|
|
|
|
|
|
|
|
// Modules:
|
|
|
|
|
// RUN: rm -rf %t
|
2015-10-08 04:24:12 +00:00
|
|
|
// RUN: %clang_cc1 -triple %itanium_abi_triple -x objective-c++ -std=c++11 -debug-info-kind=limited -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
|
2015-09-08 19:20:27 +00:00
|
|
|
// RUN: cat %t-mod.ll | FileCheck %s
|
2016-01-09 01:11:35 +00:00
|
|
|
// RUN: cat %t-mod.ll | FileCheck --check-prefix=CHECK-NEG %s
|
2015-09-22 23:26:43 +00:00
|
|
|
// RUN: cat %t-mod.ll | FileCheck --check-prefix=CHECK-DWO %s
|
2015-09-08 19:20:27 +00:00
|
|
|
|
|
|
|
|
// PCH:
|
2015-09-08 22:47:32 +00:00
|
|
|
// RUN: %clang_cc1 -triple %itanium_abi_triple -x c++ -std=c++11 -emit-pch -fmodule-format=obj -I %S/Inputs -o %t.pch %S/Inputs/DebugCXX.h -mllvm -debug-only=pchcontainer &>%t-pch.ll
|
2015-09-08 19:20:27 +00:00
|
|
|
// RUN: cat %t-pch.ll | FileCheck %s
|
2016-01-09 01:11:35 +00:00
|
|
|
// RUN: cat %t-pch.ll | FileCheck --check-prefix=CHECK-NEG %s
|
2015-09-08 19:20:27 +00:00
|
|
|
|
|
|
|
|
#ifdef MODULES
|
|
|
|
|
@import DebugCXX;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
// CHECK: distinct !DICompileUnit(language: DW_LANG_{{.*}}C_plus_plus,
|
|
|
|
|
// CHECK-SAME: isOptimized: false,
|
2015-09-22 23:26:43 +00:00
|
|
|
// CHECK-SAME-NOT: splitDebugFilename:
|
|
|
|
|
// CHECK-DWO: dwoId:
|
2016-01-06 19:22:19 +00:00
|
|
|
|
2015-09-08 19:20:27 +00:00
|
|
|
// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "Enum"
|
|
|
|
|
// CHECK-SAME: identifier: "_ZTSN8DebugCXX4EnumE")
|
|
|
|
|
// CHECK: !DINamespace(name: "DebugCXX"
|
2016-01-06 19:22:19 +00:00
|
|
|
|
2015-09-08 19:20:27 +00:00
|
|
|
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "Struct"
|
|
|
|
|
// CHECK-SAME: identifier: "_ZTSN8DebugCXX6StructE")
|
2016-01-06 19:22:19 +00:00
|
|
|
|
2015-09-08 19:20:27 +00:00
|
|
|
// CHECK: !DICompositeType(tag: DW_TAG_class_type,
|
|
|
|
|
// CHECK-SAME: name: "Template<int, DebugCXX::traits<int> >"
|
|
|
|
|
// CHECK-SAME: identifier: "_ZTSN8DebugCXX8TemplateIiNS_6traitsIiEEEE")
|
2016-01-06 19:22:19 +00:00
|
|
|
|
|
|
|
|
// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "A<void>"
|
|
|
|
|
// CHECK-SAME: identifier: "_ZTSN8DebugCXX1AIJvEEE")
|
|
|
|
|
|
2015-09-08 19:20:27 +00:00
|
|
|
// CHECK: !DICompositeType(tag: DW_TAG_class_type,
|
|
|
|
|
// CHECK-SAME: name: "Template<float, DebugCXX::traits<float> >"
|
|
|
|
|
// CHECK-SAME: identifier: "_ZTSN8DebugCXX8TemplateIfNS_6traitsIfEEEE")
|
2016-01-06 19:22:19 +00:00
|
|
|
|
|
|
|
|
// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "FwdVirtual"
|
|
|
|
|
// CHECK-SAME: elements:
|
|
|
|
|
// CHECK-SAME: identifier: "_ZTS10FwdVirtual")
|
|
|
|
|
// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "_vptr$FwdVirtual"
|
|
|
|
|
|
2015-09-08 19:20:27 +00:00
|
|
|
// CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "FloatInstatiation"
|
|
|
|
|
// no mangled name here yet.
|
2016-01-06 19:22:19 +00:00
|
|
|
|
2015-09-08 19:20:27 +00:00
|
|
|
// CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "B",
|
|
|
|
|
// no mangled name here yet.
|
2016-01-09 01:11:35 +00:00
|
|
|
|
|
|
|
|
// CHECK-NEG-NOT: !DICompositeType(tag: DW_TAG_structure_type, name: "PureForwardDecl"
|