[cfe-commits] r165962 - in /cfe/trunk: include/clang/Basic/ObjCRuntime.h lib/CodeGen/CGObjC.cpp lib/Driver/ToolChains.cpp lib/Driver/Tools.cpp lib/Sema/SemaExpr.cpp runtime/compiler-rt/Makefile test/CodeGenObjC/optimized-setter-ios-device.m test/CodeGenObjC/optimized-setter.m test/CodeGenObjC/unoptimized-setter.m test/Driver/darwin-ld.c test/Driver/pic.c
Nico Weber
nicolasweber at gmx.de
Mon Oct 15 13:37:01 PDT 2012
Author: nico
Date: Mon Oct 15 15:37:01 2012
New Revision: 165962
URL: http://llvm.org/viewvc/llvm-project?rev=165962&view=rev
Log:
Revert r164907 and r164902 (+ follow-ups). They broke building on 10.6.
See PR14013.
Removed:
cfe/trunk/test/CodeGenObjC/optimized-setter-ios-device.m
cfe/trunk/test/CodeGenObjC/unoptimized-setter.m
Modified:
cfe/trunk/include/clang/Basic/ObjCRuntime.h
cfe/trunk/lib/CodeGen/CGObjC.cpp
cfe/trunk/lib/Driver/ToolChains.cpp
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/lib/Sema/SemaExpr.cpp
cfe/trunk/runtime/compiler-rt/Makefile
cfe/trunk/test/CodeGenObjC/optimized-setter.m
cfe/trunk/test/Driver/darwin-ld.c
cfe/trunk/test/Driver/pic.c
Modified: cfe/trunk/include/clang/Basic/ObjCRuntime.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/ObjCRuntime.h?rev=165962&r1=165961&r2=165962&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/ObjCRuntime.h (original)
+++ cfe/trunk/include/clang/Basic/ObjCRuntime.h Mon Oct 15 15:37:01 2012
@@ -157,19 +157,6 @@
llvm_unreachable("bad kind");
}
- /// \brief Does this runtime supports optimized setter entrypoints?
- bool hasOptimizedSetter() const {
- switch (getKind()) {
- case MacOSX:
- return getVersion() >= VersionTuple(10, 8);
- case iOS:
- return (getVersion() >= VersionTuple(6));
-
- default:
- return false;
- }
- }
-
/// Does this runtime allow the use of __weak?
bool allowsWeak() const {
return hasNativeWeak();
@@ -190,7 +177,7 @@
switch (getKind()) {
case FragileMacOSX: return false;
case MacOSX: return getVersion() >= VersionTuple(10, 8);
- case iOS: return getVersion() >= VersionTuple(6);
+ case iOS: return false;
// This is really a lie, because some implementations and versions
// of the runtime do not support ARC. Probably -fgnu-runtime
Modified: cfe/trunk/lib/CodeGen/CGObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjC.cpp?rev=165962&r1=165961&r2=165962&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjC.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjC.cpp Mon Oct 15 15:37:01 2012
@@ -1041,7 +1041,12 @@
static bool UseOptimizedSetter(CodeGenModule &CGM) {
if (CGM.getLangOpts().getGC() != LangOptions::NonGC)
return false;
- return CGM.getLangOpts().ObjCRuntime.hasOptimizedSetter();
+ const TargetInfo &Target = CGM.getContext().getTargetInfo();
+
+ if (Target.getPlatformName() != "macosx")
+ return false;
+
+ return Target.getPlatformMinVersion() >= VersionTuple(10, 8);
}
void
@@ -1101,7 +1106,7 @@
llvm::Value *setOptimizedPropertyFn = 0;
llvm::Value *setPropertyFn = 0;
if (UseOptimizedSetter(CGM)) {
- // 10.8 and iOS 6.0 code and GC is off
+ // 10.8 code and GC is off
setOptimizedPropertyFn =
CGM.getObjCRuntime()
.GetOptimizedPropertySetFunction(strategy.isAtomic(),
Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=165962&r1=165961&r2=165962&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Mon Oct 15 15:37:01 2012
@@ -332,9 +332,7 @@
// Darwin doesn't support real static executables, don't link any runtime
// libraries with -static.
- if (Args.hasArg(options::OPT_static) ||
- Args.hasArg(options::OPT_fapple_kext) ||
- Args.hasArg(options::OPT_mkernel))
+ if (Args.hasArg(options::OPT_static))
return;
// Reject -static-libgcc for now, we can deal with this when and if someone
@@ -678,14 +676,7 @@
llvm::sys::Path P(getDriver().ResourceDir);
P.appendComponent("lib");
P.appendComponent("darwin");
-
- // Use the newer cc_kext for iOS ARM after 6.0.
- if (!isTargetIPhoneOS() || isTargetIOSSimulator() ||
- !isIPhoneOSVersionLT(6, 0)) {
- P.appendComponent("libclang_rt.cc_kext.a");
- } else {
- P.appendComponent("libclang_rt.cc_kext_ios5.a");
- }
+ P.appendComponent("libclang_rt.cc_kext.a");
// For now, allow missing resource libraries to support developers who may
// not have compiler-rt checked out or integrated into their build.
@@ -911,25 +902,6 @@
if (BoundArch)
AddDeploymentTarget(*DAL);
- // For iOS 6, undo the translation to add -static for -mkernel/-fapple-kext.
- // FIXME: It would be far better to avoid inserting those -static arguments,
- // but we can't check the deployment target in the translation code until
- // it is set here.
- if (isTargetIPhoneOS() && !isIPhoneOSVersionLT(6, 0)) {
- for (ArgList::iterator it = DAL->begin(), ie = DAL->end(); it != ie; ) {
- Arg *A = *it;
- ++it;
- if (A->getOption().getID() != options::OPT_mkernel &&
- A->getOption().getID() != options::OPT_fapple_kext)
- continue;
- assert(it != ie && "unexpected argument translation");
- A = *it;
- assert(A->getOption().getID() == options::OPT_static &&
- "missing expected -static argument");
- it = DAL->getArgs().erase(it);
- }
- }
-
// Validate the C++ standard library choice.
CXXStdlibType Type = GetCXXStdlibType(*DAL);
if (Type == ToolChain::CST_Libcxx) {
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=165962&r1=165961&r2=165962&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Mon Oct 15 15:37:01 2012
@@ -674,9 +674,7 @@
ArgStringList &CmdArgs,
bool KernelOrKext) const {
const Driver &D = getToolChain().getDriver();
- // Get the effective triple, which takes into account the deployment target.
- std::string TripleStr = getToolChain().ComputeEffectiveClangTriple(Args);
- llvm::Triple Triple(TripleStr);
+ llvm::Triple Triple = getToolChain().getTriple();
// Select the ABI to use.
//
@@ -761,10 +759,8 @@
// Kernel code has more strict alignment requirements.
if (KernelOrKext) {
- if (Triple.getOS() != llvm::Triple::IOS || Triple.isOSVersionLT(6)) {
- CmdArgs.push_back("-backend-option");
- CmdArgs.push_back("-arm-long-calls");
- }
+ CmdArgs.push_back("-backend-option");
+ CmdArgs.push_back("-arm-long-calls");
CmdArgs.push_back("-backend-option");
CmdArgs.push_back("-arm-strict-align");
@@ -1701,11 +1697,7 @@
}
// Note that these flags are trump-cards. Regardless of the order w.r.t. the
// PIC or PIE options above, if these show up, PIC is disabled.
- llvm::Triple Triple(TripleStr);
- if ((Args.hasArg(options::OPT_mkernel) ||
- Args.hasArg(options::OPT_fapple_kext)) &&
- (Triple.getOS() != llvm::Triple::IOS ||
- Triple.isOSVersionLT(6)))
+ if (Args.hasArg(options::OPT_mkernel))
PICDisabled = true;
if (Args.hasArg(options::OPT_static))
PICDisabled = true;
@@ -3698,10 +3690,7 @@
CheckCodeGenerationOptions(D, Args);
// Derived from cc1 spec.
- if ((!Args.hasArg(options::OPT_mkernel) ||
- (getDarwinToolChain().isTargetIPhoneOS() &&
- !getDarwinToolChain().isIPhoneOSVersionLT(6, 0))) &&
- !Args.hasArg(options::OPT_static) &&
+ if (!Args.hasArg(options::OPT_mkernel) && !Args.hasArg(options::OPT_static) &&
!Args.hasArg(options::OPT_mdynamic_no_pic))
CmdArgs.push_back("-fPIC");
@@ -4155,11 +4144,9 @@
CmdArgs.push_back("-force_cpusubtype_ALL");
if (getToolChain().getTriple().getArch() != llvm::Triple::x86_64 &&
- (((Args.hasArg(options::OPT_mkernel) ||
- Args.hasArg(options::OPT_fapple_kext)) &&
- (!getDarwinToolChain().isTargetIPhoneOS() ||
- getDarwinToolChain().isIPhoneOSVersionLT(6, 0))) ||
- Args.hasArg(options::OPT_static)))
+ (Args.hasArg(options::OPT_mkernel) ||
+ Args.hasArg(options::OPT_static) ||
+ Args.hasArg(options::OPT_fapple_kext)))
CmdArgs.push_back("-static");
Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA,
@@ -4520,7 +4507,7 @@
} else if (getDarwinToolChain().isTargetIPhoneOS()) {
if (getDarwinToolChain().isIPhoneOSVersionLT(3, 1))
CmdArgs.push_back("-lcrt1.o");
- else if (getDarwinToolChain().isIPhoneOSVersionLT(6, 0))
+ else
CmdArgs.push_back("-lcrt1.3.1.o");
} else {
if (getDarwinToolChain().isMacosxVersionLT(10, 5))
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=165962&r1=165961&r2=165962&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Mon Oct 15 15:37:01 2012
@@ -9770,8 +9770,11 @@
switch (ConvTy) {
case Compatible:
- DiagnoseAssignmentEnum(DstType, SrcType, SrcExpr);
- return false;
+ DiagnoseAssignmentEnum(DstType, SrcType, SrcExpr);
+
+ // XXX here with forced compatible cast
+
+ return false;
case PointerToInt:
DiagKind = diag::ext_typecheck_convert_pointer_int;
@@ -9854,6 +9857,7 @@
DiagKind = diag::err_arc_weak_unavailable_assign;
break;
case Incompatible:
+ // XXX here
DiagKind = diag::err_typecheck_convert_incompatible;
ConvHints.tryToFixConversion(SrcExpr, SrcType, DstType, *this);
MayHaveConvFixit = true;
Modified: cfe/trunk/runtime/compiler-rt/Makefile
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/runtime/compiler-rt/Makefile?rev=165962&r1=165961&r2=165962&view=diff
==============================================================================
--- cfe/trunk/runtime/compiler-rt/Makefile (original)
+++ cfe/trunk/runtime/compiler-rt/Makefile Mon Oct 15 15:37:01 2012
@@ -74,9 +74,9 @@
ifeq ($(OS),Darwin)
RuntimeDirs += darwin
RuntimeLibrary.darwin.Configs := \
- eprintf.a 10.4.a osx.a ios.a cc_kext.a cc_kext_ios5.a \
+ eprintf.a 10.4.a osx.a cc_kext.a \
asan_osx.a asan_osx_dynamic.dylib \
- profile_osx.a profile_ios.a
+ profile_osx.a
endif
# On Linux, include a library which has all the runtime functions.
Removed: cfe/trunk/test/CodeGenObjC/optimized-setter-ios-device.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/optimized-setter-ios-device.m?rev=165961&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenObjC/optimized-setter-ios-device.m (original)
+++ cfe/trunk/test/CodeGenObjC/optimized-setter-ios-device.m (removed)
@@ -1,33 +0,0 @@
-// RUN: %clang_cc1 %s -emit-llvm -fobjc-runtime=ios-6.0.0 -triple thumbv7-apple-ios6.0.0 -o - | FileCheck %s
-// rdar://11915017
-
- at interface I
-// void objc_setProperty_nonatomic(id self, SEL _cmd, id newValue, ptrdiff_t offset);
-// objc_setProperty(..., NO, NO)
- at property (nonatomic, retain) id nonatomicProperty;
-
-// void objc_setProperty_nonatomic_copy(id self, SEL _cmd, id newValue, ptrdiff_t offset);
-// objc_setProperty(..., NO, YES)
- at property (nonatomic, copy) id nonatomicPropertyCopy;
-
-// void objc_setProperty_atomic(id self, SEL _cmd, id newValue, ptrdiff_t offset);
-// objc_setProperty(..., YES, NO)
- at property (retain) id atomicProperty;
-
-// void objc_setProperty_atomic_copy(id self, SEL _cmd, id newValue, ptrdiff_t offset);
-// objc_setProperty(..., YES, YES)
- at property (copy) id atomicPropertyCopy;
- at end
-
- at implementation I
- at synthesize nonatomicProperty;
- at synthesize nonatomicPropertyCopy;
- at synthesize atomicProperty;
- at synthesize atomicPropertyCopy;
- at end
-
-// CHECK: call arm_aapcscc void @objc_setProperty_nonatomic
-// CHECK: call arm_aapcscc void @objc_setProperty_nonatomic_copy
-// CHECK: call arm_aapcscc void @objc_setProperty_atomic
-// CHECK: call arm_aapcscc void @objc_setProperty_atomic_copy
-
Modified: cfe/trunk/test/CodeGenObjC/optimized-setter.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/optimized-setter.m?rev=165962&r1=165961&r2=165962&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/optimized-setter.m (original)
+++ cfe/trunk/test/CodeGenObjC/optimized-setter.m Mon Oct 15 15:37:01 2012
@@ -1,5 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -fobjc-runtime=macosx-10.8 -triple x86_64-apple-macosx10.8.0 -o - | FileCheck %s
-// RUN: %clang_cc1 %s -emit-llvm -fobjc-runtime=ios-6.0.0 -triple x86_64-apple-ios6.0.0 -o - | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -triple x86_64-apple-macosx10.8.0 -o - | FileCheck %s
// rdar://10179974
@interface I
Removed: cfe/trunk/test/CodeGenObjC/unoptimized-setter.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/unoptimized-setter.m?rev=165961&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenObjC/unoptimized-setter.m (original)
+++ cfe/trunk/test/CodeGenObjC/unoptimized-setter.m (removed)
@@ -1,32 +0,0 @@
-// RUN: %clang_cc1 %s -emit-llvm -fobjc-runtime=macosx-10.6.0 -triple x86_64-apple-macosx10.6.0 -o - | FileCheck %s
-// rdar://11858187
-
- at interface I
-// void objc_setProperty_nonatomic(id self, SEL _cmd, id newValue, ptrdiff_t offset);
-// objc_setProperty(..., NO, NO)
- at property (nonatomic, retain) id nonatomicProperty;
-
-// void objc_setProperty_nonatomic_copy(id self, SEL _cmd, id newValue, ptrdiff_t offset);
-// objc_setProperty(..., NO, YES)
- at property (nonatomic, copy) id nonatomicPropertyCopy;
-
-// void objc_setProperty_atomic(id self, SEL _cmd, id newValue, ptrdiff_t offset);
-// objc_setProperty(..., YES, NO)
- at property (retain) id atomicProperty;
-
-// void objc_setProperty_atomic_copy(id self, SEL _cmd, id newValue, ptrdiff_t offset);
-// objc_setProperty(..., YES, YES)
- at property (copy) id atomicPropertyCopy;
- at end
-
- at implementation I
- at synthesize nonatomicProperty;
- at synthesize nonatomicPropertyCopy;
- at synthesize atomicProperty;
- at synthesize atomicPropertyCopy;
- at end
-
-// CHECK-NOT: call void @objc_setProperty_nonatomic
-// CHECK-NOT: call void @objc_setProperty_nonatomic_copy
-// CHECK-NOT: call void @objc_setProperty_atomic
-// CHECK-NOT: call void @objc_setProperty_atomic_copy
Modified: cfe/trunk/test/Driver/darwin-ld.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/darwin-ld.c?rev=165962&r1=165961&r2=165962&view=diff
==============================================================================
--- cfe/trunk/test/Driver/darwin-ld.c (original)
+++ cfe/trunk/test/Driver/darwin-ld.c Mon Oct 15 15:37:01 2012
@@ -122,10 +122,6 @@
// RUN: FileCheck -check-prefix=LINK_NO_CRT1 %s < %t.log
// LINK_NO_CRT1-NOT: crt
-// RUN: %clang -target armv7-apple-ios6.0 -miphoneos-version-min=6.0 -### %t.o 2> %t.log
-// RUN: FileCheck -check-prefix=LINK_NO_IOS_CRT1 %s < %t.log
-// LINK_NO_IOS_CRT1-NOT: crt
-
// RUN: %clang -target i386-apple-darwin12 -pg -### %t.o 2> %t.log
// RUN: FileCheck -check-prefix=LINK_PG %s < %t.log
// LINK_PG: -lgcrt1.o
Modified: cfe/trunk/test/Driver/pic.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/pic.c?rev=165962&r1=165961&r2=165962&view=diff
==============================================================================
--- cfe/trunk/test/Driver/pic.c (original)
+++ cfe/trunk/test/Driver/pic.c Mon Oct 15 15:37:01 2012
@@ -93,13 +93,3 @@
// RUN: | FileCheck %s --check-prefix=CHECK-DYNAMIC-NO-PIC1
// RUN: %clang -c %s -target i386-apple-darwin -mdynamic-no-pic -fPIC -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK-DYNAMIC-NO-PIC2
-
-// Checks for ARM
-// RUN: %clang -c %s -target armv7-apple-ios -fapple-kext -miphoneos-version-min=6.0.0 -### 2>&1 \
-// RUN: | FileCheck %s --check-prefix=CHECK-PIC2
-// RUN: %clang -c %s -target armv7-apple-ios -mkernel -miphoneos-version-min=6.0.0 -### 2>&1 \
-// RUN: | FileCheck %s --check-prefix=CHECK-PIC2
-// RUN: %clang -c %s -target armv7-apple-ios -fapple-kext -miphoneos-version-min=5.0.0 -### 2>&1 \
-// RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
-// RUN: %clang -c %s -target armv7-apple-ios -fapple-kext -miphoneos-version-min=6.0.0 -static -### 2>&1 \
-// RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
More information about the cfe-commits
mailing list