[clang] f97e01e - Revert "[AIX] Define __STDC_NO_ATOMICS__ and __STDC_NO_THREADS__ predefined macros"

Chris Bowler via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 7 19:47:29 PDT 2021


Author: Chris Bowler
Date: 2021-06-07T22:45:41-04:00
New Revision: f97e01e61af1115bb9cb68dbdc70cc7f9f884759

URL: https://github.com/llvm/llvm-project/commit/f97e01e61af1115bb9cb68dbdc70cc7f9f884759
DIFF: https://github.com/llvm/llvm-project/commit/f97e01e61af1115bb9cb68dbdc70cc7f9f884759.diff

LOG: Revert "[AIX] Define __STDC_NO_ATOMICS__ and __STDC_NO_THREADS__ predefined macros"

This reverts commit e6629be31e67190f0a524f009752d73410894560.

Added: 
    

Modified: 
    clang/lib/Basic/Targets/OSTargets.h
    clang/test/Preprocessor/init-ppc.c

Removed: 
    


################################################################################
diff  --git a/clang/lib/Basic/Targets/OSTargets.h b/clang/lib/Basic/Targets/OSTargets.h
index 6e4e6f0aafe40..cecac1cec172a 100644
--- a/clang/lib/Basic/Targets/OSTargets.h
+++ b/clang/lib/Basic/Targets/OSTargets.h
@@ -676,11 +676,6 @@ class AIXTargetInfo : public OSTargetInfo<Target> {
 
     Builder.defineMacro("_AIX");
 
-    if (LangStandard::getLangStandardForKind(Opts.LangStd).isC11()) {
-      Builder.defineMacro("__STDC_NO_ATOMICS__");
-      Builder.defineMacro("__STDC_NO_THREADS__");
-    }
-
     if (Opts.EnableAIXExtendedAltivecABI)
       Builder.defineMacro("__EXTABI__");
 

diff  --git a/clang/test/Preprocessor/init-ppc.c b/clang/test/Preprocessor/init-ppc.c
index 5301c7e3f59df..aa0f8c97de126 100644
--- a/clang/test/Preprocessor/init-ppc.c
+++ b/clang/test/Preprocessor/init-ppc.c
@@ -723,16 +723,6 @@
 // RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc-ibm-aix7.1.0.0 -fno-signed-char < /dev/null | FileCheck -match-full-lines -check-prefix PPC-AIX-NOTHREADSAFE %s
 // PPC-AIX-NOTHREADSAFE-NOT:#define _THREAD_SAFE 1
 
-// RUN: %clang_cc1 -x c -std=c11 -E -dM -ffreestanding -triple=powerpc-ibm-aix7.1.0.0 -fno-signed-char < /dev/null | FileCheck -match-full-lines -check-prefix PPC-AIX-STDC %s
-// RUN: %clang_cc1 -x c -std=gnu11 -E -dM -ffreestanding -triple=powerpc-ibm-aix7.1.0.0 -fno-signed-char < /dev/null | FileCheck -match-full-lines -check-prefix PPC-AIX-STDC %s
-// RUN: %clang_cc1 -x c -std=c17 -E -dM -ffreestanding -triple=powerpc-ibm-aix7.1.0.0 -fno-signed-char < /dev/null | FileCheck -match-full-lines -check-prefix PPC-AIX-STDC %s
-// PPC-AIX-STDC:#define __STDC_NO_ATOMICS__ 1
-// PPC-AIX-STDC:#define __STDC_NO_THREADS__ 1
-
-// RUN: %clang_cc1 -x c -std=c99 -E -dM -ffreestanding -triple=powerpc-ibm-aix7.1.0.0 -fno-signed-char < /dev/null | FileCheck -match-full-lines -check-prefix PPC-AIX-STDC-N %s
-// PPC-AIX-STDC-N-NOT:#define __STDC_NO_ATOMICS__ 1
-// PPC-AIX-STDC-N-NOT:#define __STDC_NO_THREADS__ 1
-
 // RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc-unknown-linux-gnu -fno-signed-char < /dev/null | FileCheck -match-full-lines -check-prefix PPC-LINUX %s
 //
 // PPC-LINUX:#define _ARCH_PPC 1


        


More information about the cfe-commits mailing list