Add testcase omitted from r181998.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182043 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/cxx11-thread-local.cpp b/test/CodeGenCXX/cxx11-thread-local.cpp
index a7141d1..2987703 100644
--- a/test/CodeGenCXX/cxx11-thread-local.cpp
+++ b/test/CodeGenCXX/cxx11-thread-local.cpp
@@ -128,6 +128,13 @@
 
 // CHECK: declare i32 @__cxa_thread_atexit(void (i8*)*, i8*, i8*)
 
+// CHECK: define {{.*}} @_Z7PR15991v(
+int PR15991() {
+  thread_local int n;
+  auto l = [] { return n; };
+  return l();
+}
+
 // CHECK: define {{.*}} @[[V_M_INIT:.*]]()
 // CHECK: load i8* bitcast (i64* @_ZGVN1VIiE1mE to i8*)
 // CHECK: %[[V_M_INITIALIZED:.*]] = icmp eq i8 %{{.*}}, 0