Skip to content

Commit ff2cb6e

Browse files
brad0tstellar
authored andcommitted
[clang] Partially revert d8cd780.
The C11 atomics part was wrong. (cherry picked from commit 95e6e1c)
1 parent ed38280 commit ff2cb6e

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

clang/lib/Basic/Targets/OSTargets.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,10 +461,8 @@ class LLVM_LIBRARY_VISIBILITY OpenBSDTargetInfo : public OSTargetInfo<Target> {
461461
if (this->HasFloat128)
462462
Builder.defineMacro("__FLOAT128__");
463463

464-
if (Opts.C11) {
465-
Builder.defineMacro("__STDC_NO_ATOMICS__");
464+
if (Opts.C11)
466465
Builder.defineMacro("__STDC_NO_THREADS__");
467-
}
468466
}
469467

470468
public:

clang/test/Preprocessor/init.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,11 +1467,9 @@
14671467
// 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
14681468
// 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
14691469
// 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
1470-
// OPENBSD-STDC:#define __STDC_NO_ATOMICS__ 1
14711470
// OPENBSD-STDC:#define __STDC_NO_THREADS__ 1
14721471
//
14731472
// 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
1474-
// OPENBSD-STDC-N-NOT:#define __STDC_NO_ATOMICS__ 1
14751473
// OPENBSD-STDC-N-NOT:#define __STDC_NO_THREADS__ 1
14761474
//
14771475
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=xcore-none-none < /dev/null | FileCheck -match-full-lines -check-prefix XCORE %s

0 commit comments

Comments
 (0)