mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-10 00:16:06 +00:00

Previously, when clang was compiled with -DLLVM_ENABLE_ASSERTIONS=ON, the added tests were displaying: inlinable function call in a function with debug info must have a !dbg location call void @"??1?$c@UB@@@@QEAA@XZ"(%struct.c* @"?f@?1??d@@YAPEAU?$c@UB@@@@XZ@4U2@A") fatal error: error in backend: Broken module found, compilation aborted! Stack dump: 0. Program arguments: <f:\svn\buildninja\bin\clang -cc1 -emit-llvm debug-info-no-location.cpp> -gcodeview -debug-info-kind=limited 1. <eof> parser at end of file 2. Per-function optimization Fixes PR43012 Differential Revision: https://reviews.llvm.org/D66328
23 lines
753 B
C++
23 lines
753 B
C++
// RUN: %clang_cc1 -emit-llvm %s -triple x86_64-windows-msvc -gcodeview -debug-info-kind=limited -o - | FileCheck %s
|
|
|
|
struct a {
|
|
~a();
|
|
};
|
|
template <typename b> struct c : a {
|
|
c(void (b::*)());
|
|
};
|
|
struct B {
|
|
virtual void e();
|
|
};
|
|
c<B> *d() {
|
|
static c<B> f(&B::e);
|
|
return &f;
|
|
}
|
|
|
|
// CHECK: define internal void @"??__Ff@?1??d@@YAPEAU?$c@UB@@@@XZ@YAXXZ"()
|
|
// CHECK-SAME: !dbg ![[SUBPROGRAM:[0-9]+]] {
|
|
// CHECK: call void @"??1?$c@UB@@@@QEAA@XZ"(%struct.c* @"?f@?1??d@@YAPEAU?$c@UB@@@@XZ@4U2@A"), !dbg ![[LOCATION:[0-9]+]]
|
|
// CHECK: ![[SUBPROGRAM]] = distinct !DISubprogram(name: "`dynamic atexit destructor for 'f'"
|
|
// CHECK-SAME: flags: DIFlagArtificial
|
|
// CHECK: ![[LOCATION]] = !DILocation(line: 0, scope: ![[SUBPROGRAM]])
|