Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenCXX / debug-info-global.cpp
blob5abc050431d1d9f1925d3b8df595176e1b8d9ebd
1 // RUN: %clang_cc1 -triple x86_64-none-linux-gnu -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
3 // Multiple references to the same constant should result in only one entry in
4 // the globals list.
6 namespace ns {
7 const int cnst = 42;
9 int f1() {
10 return ns::cnst + ns::cnst;
13 // CHECK: !DICompileUnit(
14 // CHECK-SAME: globals: [[GLOBALS:![0-9]*]]
16 // CHECK: [[GLOBALS]] = !{[[CNST:![0-9]*]]}
18 // CHECK: [[CNST]] = !DIGlobalVariableExpression(var: [[CNSTV:.*]], expr:
19 // CHECK: [[CNSTV]] = distinct !DIGlobalVariable(name: "cnst",
20 // CHECK-SAME: scope: [[NS:![0-9]*]]
21 // CHECK: [[NS]] = !DINamespace(name: "ns"