[InstCombine] Preserve NSW flags for `lshr (mul nuw X, C1), C2 -> mul nuw nsw X,...
[llvm-project.git] / clang / test / CodeGenCXX / debug-info-ctor-homing-flag.cpp
blob4398fa3b532ce0c8badeee879e2c06e90ffa6317
1 // RUN: %clang_cc1 -debug-info-kind=constructor -emit-llvm %s -o - \
2 // RUN: | FileCheck %s -check-prefix=CTOR_HOMING
3 // RUN: %clang_cc1 -debug-info-kind=limited -fuse-ctor-homing -emit-llvm %s -o - \
4 // RUN: | FileCheck %s -check-prefix=CTOR_HOMING
5 // RUN: %clang_cc1 -debug-info-kind=standalone -fuse-ctor-homing -emit-llvm %s -o - \
6 // RUN: | FileCheck %s -check-prefix=FULL_DEBUG
7 // RUN: %clang_cc1 -debug-info-kind=line-tables-only -fuse-ctor-homing -emit-llvm %s -o - \
8 // RUN: | FileCheck %s -check-prefix=NO_DEBUG
9 // RUN: %clang_cc1 -fuse-ctor-homing -emit-llvm %s -o - \
10 // RUN: | FileCheck %s -check-prefix=NO_DEBUG
12 // RUN: %clang_cc1 -debug-info-kind=constructor -fno-use-ctor-homing \
13 // RUN: -emit-llvm %s -o - | FileCheck %s -check-prefix=FULL_DEBUG
15 // This tests that the -fuse-ctor-homing is only used if limited debug info would have
16 // been used otherwise.
18 // CTOR_HOMING: !DICompositeType(tag: DW_TAG_structure_type, name: "A"{{.*}}flags: DIFlagFwdDecl
19 // FULL_DEBUG: !DICompositeType(tag: DW_TAG_structure_type, name: "A"{{.*}}DIFlagTypePassByValue
20 // NO_DEBUG-NOT: !DICompositeType(tag: DW_TAG_structure_type, name: "A"
21 struct A {
22 A();
23 } TestA;