Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Modules / lsv-debuginfo.cpp
blobd4c646146b37ac3b6bfd1166e8f2b04714639de7
1 // Test C++ -gmodules debug info in the PCMs with local submodule visibility.
2 // REQUIRES: asserts
3 // RUN: rm -rf %t
4 // RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++14 \
5 // RUN: -fmodules-local-submodule-visibility %s \
6 // RUN: -dwarf-ext-refs -fmodule-format=obj -debug-info-kind=standalone \
7 // RUN: -dwarf-version=4 -fmodules -fimplicit-module-maps \
8 // RUN: -fmodules-cache-path="%t" -o %t.ll -I%S/Inputs/lsv-debuginfo \
9 // RUN: -mllvm -debug-only=pchcontainer &>%t-mod.ll
10 // RUN: cat %t-mod.ll | FileCheck %s
12 // RUN: rm -rf %t
13 // RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++14 \
14 // RUN: -fmodules-local-submodule-visibility %s \
15 // RUN: -dwarf-ext-refs -fmodule-format=obj -debug-info-kind=standalone \
16 // RUN: -dwarf-version=4 -fmodules -fimplicit-module-maps \
17 // RUN: -fmodules-cache-path="%t" -o %t.ll -I%S/Inputs/lsv-debuginfo \
18 // RUN: -DWITH_NAMESPACE \
19 // RUN: -mllvm -debug-only=pchcontainer &>%t-mod.ll
20 // RUN: cat %t-mod.ll | FileCheck %s
22 // ADT
23 // CHECK: @__clang_ast =
25 // B
26 // CHECK: @__clang_ast =
28 // This type isn't anchored anywhere, expect a full definition.
29 // CHECK: !DICompositeType({{.*}}, name: "AlignedCharArray<4U, 16U>",
30 // CHECK-SAME: elements:
32 // C
33 // CHECK: @__clang_ast =
35 // Here, too.
36 // CHECK: !DICompositeType({{.*}}, name: "AlignedCharArray<4U, 16U>",
37 // CHECK-SAME: elements:
39 #include <B/B.h>