commit | 3bb92693c3332c1e99870a4e45afff3892e1c6ae | [log] [tgz] |
---|---|---|
author | Anders Carlsson <andersca@mac.com> | Tue Jan 26 17:43:42 2010 +0000 |
committer | Anders Carlsson <andersca@mac.com> | Tue Jan 26 17:43:42 2010 +0000 |
tree | 9084659d506d9298340589f7689497c4376c89c7 | |
parent | 0f0bbbca56b706af9c0feca0e5ffc6ba29320f8c [diff] [blame] |
Use the right definition when emitting a global variable. Fixes PR5564. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94555 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/static-data-member.cpp b/test/CodeGenCXX/static-data-member.cpp index 53a1d5e..b3a2af2 100644 --- a/test/CodeGenCXX/static-data-member.cpp +++ b/test/CodeGenCXX/static-data-member.cpp
@@ -1,4 +1,14 @@ // RUN: %clang_cc1 -emit-llvm -o - %s + +// CHECK: @_ZN1A1aE = constant i32 10 + +// PR5564. +struct A { + static const int a = 10; +}; + +const int A::a; + struct S { static int i; };