objc: Implemented variables declared in class interface
whose sema decl is at the translation unit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67249 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenObjC/interface-tu-variable.m b/test/CodeGenObjC/interface-tu-variable.m
new file mode 100644
index 0000000..423a05f
--- /dev/null
+++ b/test/CodeGenObjC/interface-tu-variable.m
@@ -0,0 +1,24 @@
+// RUN: clang -fnext-runtime -emit-llvm -o %t %s
+// RUN: grep 'two = global' %t &&
+// RUN: grep 'ddd = common' %t &&
+// RUN: grep 'III = common' %t
+
+@interface XX
+int x;
+int one=1;
+int two = 2;
+@end
+
+@protocol PPP
+int ddd;
+@end
+
+@interface XX(CAT)
+ char * III;
+@end
+
+
+int main( int argc, const char *argv[] ) {
+ return x+one+two;
+}
+