Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CXX / dcl.dcl / dcl.link / p7.cpp
blob81cb28cef40fd82219cd8a31bf9b7d0178e16a66
1 // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
3 struct X { };
5 // CHECK: @x1 = {{(dso_local )?}}global %struct.X zeroinitializer
6 // CHECK: @x4 = {{(dso_local )?}}global %struct.X zeroinitializer
7 // CHECK: @x2 = external {{(dso_local )?}}global %struct.X
8 // CHECK: @x3 = external {{(dso_local )?}}global %struct.X
9 extern "C" {
10 X x1;
13 extern "C" X x2;
15 extern X x3;
17 X x4;
19 X& get(int i) {
20 if (i == 1)
21 return x1;
22 else if (i == 2)
23 return x2;
24 else if (i == 3)
25 return x3;
26 else
27 return x4;