blob: 419615fb40edbd369f38cfd61e1db0fe41de4093 [file] [edit]
// Check that the "thread-model" module flag is emitted for -mthread-model
// single, and omitted when the model matches the target default (posix).
// RUN: %clang_cc1 -triple arm-none-linux-gnueabi -mthread-model single -emit-llvm %s -o - | FileCheck %s --check-prefix=SINGLE
// RUN: %clang_cc1 -triple arm-none-linux-gnueabi -mthread-model posix -emit-llvm %s -o - | FileCheck %s --check-prefix=POSIX
// RUN: %clang_cc1 -triple arm-none-linux-gnueabi -emit-llvm %s -o - | FileCheck %s --check-prefix=POSIX
// RUN: %clang_cc1 -triple wasm32-unknown-unknown -mthread-model single -emit-llvm %s -o - | FileCheck %s --check-prefix=WASM-SINGLE
// RUN: %clang_cc1 -triple wasm32-unknown-unknown -target-feature +atomics -target-feature +bulk-memory -mthread-model posix -emit-llvm %s -o - | FileCheck %s --check-prefix=WASM-POSIX
// RUN: %clang_cc1 -triple wasm32-unknown-unknown -target-feature +atomics -target-feature +bulk-memory -emit-llvm %s -o - | FileCheck %s --check-prefix=WASM-POSIX
// RUN: %clang_cc1 -triple wasm32-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix=WASM-SINGLE
void f(void) {}
// SINGLE: !{i32 1, !"thread-model", !"single"}
// POSIX-NOT: "thread-model"
// WASM-SINGLE-NOT: "thread-model"
// WASM-POSIX: !{i32 1, !"thread-model", !"posix"}