summaryrefslogtreecommitdiff
path: root/test/CodeGen/merge-statics.c
blob: 4baf902488c531edc2599a4c6bb49f2fc8822f62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: %clang_cc1 < %s -emit-llvm | FileCheck %s

// The two decls for 'a' should merge into one llvm GlobalVariable.

struct s { int x; };
static struct s a;

struct s *ap1 = &a;

static struct s a =  {
    10
};

// CHECK-NOT: internal global
// CHECK: @a = internal global %struct.s { i32 10 }
// CHECK-NOT: internal-global