Use new getLinkage() method to correctly compute whether a variable has
internal linkage.  Fixes PR5433.

llvm-svn: 89931
diff --git a/clang/test/CodeGenCXX/const-global-linkage.cpp b/clang/test/CodeGenCXX/const-global-linkage.cpp
new file mode 100644
index 0000000..ddf4358
--- /dev/null
+++ b/clang/test/CodeGenCXX/const-global-linkage.cpp
@@ -0,0 +1,8 @@
+// RUN: clang-cc -emit-llvm -o - %s | FileCheck %s
+
+const int x = 10;
+const int y = 20;
+// CHECK-NOT: @x
+// CHECK: @y = internal constant i32 20
+const int& b() { return y; }
+