Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / assignment-tracking / nested-scope.cpp
blobd94e42a139c1cc22e7f0efbb512d99f5d287e538
1 // RUN: %clang_cc1 -triple x86_64-none-linux-gnu -debug-info-kind=standalone -O0 \
2 // RUN: -emit-llvm -fexperimental-assignment-tracking=forced %s -o - \
3 // RUN: -disable-O0-optnone \
4 // RUN: | FileCheck %s
6 // Check that dbg.assign intrinsics get a !dbg with with the same scope as
7 // their variable.
9 // CHECK: call void @llvm.dbg.assign({{.+}}, metadata [[local:![0-9]+]], {{.+}}, {{.+}}, {{.+}}), !dbg [[dbg:![0-9]+]]
10 // CHECK-DAG: [[local]] = !DILocalVariable(name: "local", scope: [[scope:![0-9]+]],
11 // CHECK-DAG: [[dbg]] = !DILocation({{.+}}, scope: [[scope]])
12 // CHECK-DAG: [[scope]] = distinct !DILexicalBlock
14 void ext(int*);
15 void fun() {
17 int local;