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

Summary: This change adds DIFlagNonTrivial to forward declarations of DICompositeType. It adds the flag to nontrivial types and types with unknown triviality. It fixes adding the "CxxReturnUdt" flag to functions inconsistently, since it is added based on whether the return type is marked NonTrivial, and that changes if the return type was a forward declaration. continues the discussion at https://reviews.llvm.org/D75215 Bug: https://bugs.llvm.org/show_bug.cgi?id=44785 Reviewers: rnk, dblaikie, aprantl Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D77436
12 lines
544 B
C++
12 lines
544 B
C++
// RUN: %clang_cc1 -emit-llvm -gcodeview -debug-info-kind=limited -x c %s -o - | FileCheck %s --check-prefix CHECK-C
|
|
// RUN: %clang_cc1 -emit-llvm -gcodeview -debug-info-kind=limited -x c++ %s -o - | FileCheck %s --check-prefix CHECK-CXX
|
|
//
|
|
// Test for DIFlagNonTrivial on forward declared DICompositeTypes.
|
|
|
|
struct Incomplete;
|
|
struct Incomplete (*func_ptr)() = 0;
|
|
// CHECK-C: !DICompositeType({{.*}}name: "Incomplete"
|
|
// CHECK-C-NOT: DIFlagNonTrivial
|
|
// CHECK-CXX: !DICompositeType({{.*}}name: "Incomplete"
|
|
// CHECK-CXX-SAME: DIFlagNonTrivial
|