Author: srhines
Date: Tue Nov  8 15:54:49 2016
New Revision: 286298

URL: http://llvm.org/viewvc/llvm-project?rev=286298&view=rev
Log:
Revert "Define __ANDROID_API__ for all Android builds."

Summary: This reverts commit a8804ddd9fe71304b28e5b834d134fe93e568ee0.

Subscribers: cfe-commits, pirama, eugenis, tberghammer, danalbert

Differential Revision: https://reviews.llvm.org/D26422

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

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=286298&r1=286297&r2=286298&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Tue Nov  8 15:54:49 2016
@@ -465,8 +465,6 @@ protected:
       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");

Removed: cfe/trunk/test/Driver/android-targets.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/android-targets.cpp?rev=286297&view=auto
==============================================================================
--- cfe/trunk/test/Driver/android-targets.cpp (original)
+++ cfe/trunk/test/Driver/android-targets.cpp (removed)
@@ -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


_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to