1; RUN: not lli -no-process-syms -emulated-tls -jit-kind=orc-lazy %s 2>&1 \ 2; RUN: | FileCheck %s 3; 4; Test that emulated-tls does not generate any unexpected errors. 5; 6; Unfortunately we cannot test successful execution of JIT'd code with 7; emulated-tls as this would require the JIT itself, in this case lli, to be 8; built with emulated-tls, which is not a common configuration. Instead we test 9; that the only error produced by the JIT for a thread-local with emulated-tls 10; enabled is a missing symbol error for __emutls_get_address. An unresolved 11; reference to this symbol (and only this symbol) implies (1) that the emulated 12; tls lowering was applied, and (2) that thread locals defined in the JIT'd code 13; were otherwise handled correctly. 14 15; CHECK: JIT session error: Symbols not found: [ {{[^,]*}}__emutls_get_address ] 16 17@x = thread_local global i32 42, align 4 18 19define i32 @main(i32 %argc, i8** %argv) { 20entry: 21 %0 = load i32, i32* @x, align 4 22 ret i32 %0 23} 24