This revision was automatically updated to reflect the committed changes.
Closed by commit rL286298: Revert "Define __ANDROID_API__ for all Android 
builds." (authored by srhines).

Changed prior to commit:
  https://reviews.llvm.org/D26422?vs=77254&id=77256#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D26422

Files:
  cfe/trunk/lib/Basic/Targets.cpp
  cfe/trunk/test/Driver/android-targets.cpp

Index: cfe/trunk/test/Driver/android-targets.cpp
===================================================================
--- cfe/trunk/test/Driver/android-targets.cpp
+++ cfe/trunk/test/Driver/android-targets.cpp
@@ -1,83 +0,0 @@
-// Test API-related defines for various Android targets.
-//
-// RUN: %clang %s -emit-llvm -S -c -o - \
-// RUN:     -target arm-linux-androideabi \
-// RUN:   | FileCheck %s
-// RUN: %clang %s -emit-llvm -S -c -o - \
-// RUN:     -target arm-linux-androideabi19 \
-// RUN:   | FileCheck %s -check-prefix=LEVEL19
-// RUN: %clang %s -emit-llvm -S -c -o - \
-// RUN:     -target arm-linux-androideabi20 \
-// RUN:   | FileCheck %s -check-prefix=LEVEL20
-//
-// RUN: %clang %s -emit-llvm -S -c -o - \
-// RUN:     -target aarch64-linux-android \
-// RUN:   | FileCheck %s
-// RUN: %clang %s -emit-llvm -S -c -o - \
-// RUN:     -target aarch64-linux-android19 \
-// RUN:   | FileCheck %s -check-prefix=LEVEL19
-// RUN: %clang %s -emit-llvm -S -c -o - \
-// RUN:     -target aarch64-linux-android20 \
-// RUN:   | FileCheck %s -check-prefix=LEVEL20
-//
-// RUN: %clang %s -emit-llvm -S -c -o - \
-// RUN:     -target i686-linux-android \
-// RUN:   | FileCheck %s
-// RUN: %clang %s -emit-llvm -S -c -o - \
-// RUN:     -target i686-linux-android19 \
-// RUN:   | FileCheck %s -check-prefix=LEVEL19
-// RUN: %clang %s -emit-llvm -S -c -o - \
-// RUN:     -target i686-linux-android20 \
-// RUN:   | FileCheck %s -check-prefix=LEVEL20
-//
-// RUN: %clang %s -emit-llvm -S -c -o - \
-// RUN:     -target x86_64-linux-android \
-// RUN:   | FileCheck %s
-// RUN: %clang %s -emit-llvm -S -c -o - \
-// RUN:     -target x86_64-linux-android19 \
-// RUN:   | FileCheck %s -check-prefix=LEVEL19
-// RUN: %clang %s -emit-llvm -S -c -o - \
-// RUN:     -target x86_64-linux-android20 \
-// RUN:   | FileCheck %s -check-prefix=LEVEL20
-//
-// RUN: %clang %s -emit-llvm -S -c -o - \
-// RUN:     -target mipsel-linux-android \
-// RUN:   | FileCheck %s
-// RUN: %clang %s -emit-llvm -S -c -o - \
-// RUN:     -target mipsel-linux-android19 \
-// RUN:   | FileCheck %s -check-prefix=LEVEL19
-// RUN: %clang %s -emit-llvm -S -c -o - \
-// RUN:     -target mipsel-linux-android20 \
-// RUN:   | FileCheck %s -check-prefix=LEVEL20
-//
-// RUN: %clang %s -emit-llvm -S -c -o - \
-// RUN:     -target mips64el-linux-android \
-// RUN:   | FileCheck %s
-// RUN: %clang %s -emit-llvm -S -c -o - \
-// RUN:     -target mips64el-linux-android19 \
-// RUN:   | FileCheck %s -check-prefix=LEVEL19
-// RUN: %clang %s -emit-llvm -S -c -o - \
-// RUN:     -target mips64el-linux-android20 \
-// RUN:   | FileCheck %s -check-prefix=LEVEL20
-
-// CHECK: __ANDROID__defined
-// LEVEL19: __ANDROID__defined
-// LEVEL20: __ANDROID__defined
-#ifdef __ANDROID__
-void __ANDROID__defined(void) {}
-#endif
-
-// CHECK-NOT: __ANDROID_API__defined
-// LEVEL19: __ANDROID_API__defined
-// LEVEL20: __ANDROID_API__defined
-#ifdef __ANDROID_API__
-void __ANDROID_API__defined(void) {}
-int android_api = __ANDROID_API__;
-#endif
-
-// CHECK-NOT: __ANDROID_API__20
-// LEVEL19-NOT: __ANDROID_API__20
-// LEVEL20: __ANDROID_API__20
-#if __ANDROID_API__ >= 20
-void __ANDROID_API__20(void) {}
-#endif
Index: cfe/trunk/lib/Basic/Targets.cpp
===================================================================
--- cfe/trunk/lib/Basic/Targets.cpp
+++ cfe/trunk/lib/Basic/Targets.cpp
@@ -465,8 +465,6 @@
       Triple.getEnvironmentVersion(Maj, Min, Rev);
       this->PlatformName = "android";
       this->PlatformMinVersion = VersionTuple(Maj, Min, Rev);
-      if (Maj)
-        Builder.defineMacro("__ANDROID_API__", Twine(Maj));
     }
     if (Opts.POSIXThreads)
       Builder.defineMacro("_REENTRANT");
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to