[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Modules / ModuleDebugInfoDwoId.cpp
blob9129364794a8663826c01b332bda55dacfbbd214
1 // UNSUPPORTED: target={{.*}}-zos{{.*}}, target={{.*}}-aix{{.*}}
2 // Tests that dwoIds in modules match the dwoIDs in the main file.
4 // REQUIRES: asserts
6 // RUN: rm -rf %t.cache
7 // RUN: %clang_cc1 -triple %itanium_abi_triple -x objective-c++ -std=c++11 -debugger-tuning=lldb -debug-info-kind=limited -fmodules -fmodule-format=obj -dwarf-ext-refs -fimplicit-module-maps -fmodules-cache-path=%t.cache %s -I %S/Inputs -emit-llvm -o %t.ll -mllvm -debug-only=pchcontainer 2> %t.mod-out
8 // RUN: cat %t.ll %t.mod-out | FileCheck %s
9 // RUN: cat %t.ll | FileCheck --check-prefix=CHECK-REALIDS %s
10 // RUN: cat %t.mod-out | FileCheck --check-prefix=CHECK-REALIDS %s
12 @import DebugDwoId;
14 Dummy d;
16 // Find the emitted dwoID for DebugInfoId and compare it against the one in the PCM.
17 // CHECK: DebugDwoId-{{[A-Z0-9]+}}.pcm
18 // CHECK-SAME: dwoId: [[DWOID:[0-9]+]]
19 // CHECK: dwoId: [[DWOID]]
20 // CHECK-NEXT: !DIFile(filename: "DebugDwoId"
22 // Make sure the dwo IDs are real IDs and not fallback values (~1ULL).
23 // CHECK-REALIDS-NOT: dwoId: 18446744073709551615