diff options
| -rw-r--r-- | clang/test/CodeGenCXX/cxx11-thread-local.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/cxx11-thread-local.cpp b/clang/test/CodeGenCXX/cxx11-thread-local.cpp index a7141d133bb..29877033621 100644 --- a/clang/test/CodeGenCXX/cxx11-thread-local.cpp +++ b/clang/test/CodeGenCXX/cxx11-thread-local.cpp @@ -128,6 +128,13 @@ void tls_dtor() { // 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 |

