Skip to content

Commit

Permalink
[clang] Partially revert d8cd780.
Browse files Browse the repository at this point in the history
The C11 atomics part was wrong.
  • Loading branch information
brad0 committed Oct 29, 2021
1 parent fc1b24d commit 95e6e1c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 1 addition & 3 deletions clang/lib/Basic/Targets/OSTargets.h
Original file line number Diff line number Diff line change
Expand Up @@ -464,10 +464,8 @@ class LLVM_LIBRARY_VISIBILITY OpenBSDTargetInfo : public OSTargetInfo<Target> {
if (this->HasFloat128)
Builder.defineMacro("__FLOAT128__");

if (Opts.C11) {
Builder.defineMacro("__STDC_NO_ATOMICS__");
if (Opts.C11)
Builder.defineMacro("__STDC_NO_THREADS__");
}
}

public:
Expand Down
2 changes: 0 additions & 2 deletions clang/test/Preprocessor/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1467,11 +1467,9 @@
// RUN: %clang_cc1 -x c -std=c11 -E -dM -ffreestanding -triple=amd64-unknown-openbsd < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD-STDC %s
// RUN: %clang_cc1 -x c -std=gnu11 -E -dM -ffreestanding -triple=amd64-unknown-openbsd < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD-STDC %s
// RUN: %clang_cc1 -x c -std=c17 -E -dM -ffreestanding -triple=amd64-unknown-openbsd < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD-STDC %s
// OPENBSD-STDC:#define __STDC_NO_ATOMICS__ 1
// OPENBSD-STDC:#define __STDC_NO_THREADS__ 1
//
// RUN: %clang_cc1 -x c -std=c99 -E -dM -ffreestanding -triple=amd64-unknown-openbsd < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD-STDC-N %s
// OPENBSD-STDC-N-NOT:#define __STDC_NO_ATOMICS__ 1
// OPENBSD-STDC-N-NOT:#define __STDC_NO_THREADS__ 1
//
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=xcore-none-none < /dev/null | FileCheck -match-full-lines -check-prefix XCORE %s
Expand Down

0 comments on commit 95e6e1c

Please sign in to comment.