[llvm] r221436 - Add three other sections when L symbols are allowed.
Rafael Espindola
rafael.espindola at gmail.com
Wed Nov 5 21:01:21 PST 2014
Author: rafael
Date: Wed Nov 5 23:01:21 2014
New Revision: 221436
URL: http://llvm.org/viewvc/llvm-project?rev=221436&view=rev
Log:
Add three other sections when L symbols are allowed.
Modified:
llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
llvm/trunk/test/CodeGen/X86/osx-private-labels.ll
Modified: llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp?rev=221436&r1=221435&r2=221436&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp (original)
+++ llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp Wed Nov 5 23:01:21 2014
@@ -584,6 +584,21 @@ bool TargetLoweringObjectFileMachO::isSe
if (SMO.getKind().isMergeable1ByteCString())
return false;
+ if (SMO.getSegmentName() == "__TEXT" &&
+ SMO.getSectionName() == "__objc_classname" &&
+ SMO.getType() == MachO::S_CSTRING_LITERALS)
+ return false;
+
+ if (SMO.getSegmentName() == "__TEXT" &&
+ SMO.getSectionName() == "__objc_methname" &&
+ SMO.getType() == MachO::S_CSTRING_LITERALS)
+ return false;
+
+ if (SMO.getSegmentName() == "__TEXT" &&
+ SMO.getSectionName() == "__objc_methtype" &&
+ SMO.getType() == MachO::S_CSTRING_LITERALS)
+ return false;
+
if (SMO.getSegmentName() == "__DATA" &&
SMO.getSectionName() == "__cfstring")
return false;
Modified: llvm/trunk/test/CodeGen/X86/osx-private-labels.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/osx-private-labels.ll?rev=221436&r1=221435&r2=221436&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/osx-private-labels.ll (original)
+++ llvm/trunk/test/CodeGen/X86/osx-private-labels.ll Wed Nov 5 23:01:21 2014
@@ -74,3 +74,15 @@
; CHECK: .section __DATA,__objc_classlist,regular,no_dead_strip
; CHECK-NEXT: .align 2
; CHECK-NEXT: L_private13:
+
+ at private14 = private global [4 x i8] c"zed\00", section "__TEXT,__objc_classname,cstring_literals"
+; CHECK: .section __TEXT,__objc_classname,cstring_literals
+; CHECK-NEXT: L_private14:
+
+ at private15 = private global [4 x i8] c"zed\00", section "__TEXT,__objc_methname,cstring_literals"
+; CHECK: .section __TEXT,__objc_methname,cstring_literals
+; CHECK-NEXT: L_private15:
+
+ at private16 = private global [4 x i8] c"zed\00", section "__TEXT,__objc_methtype,cstring_literals"
+; CHECK: .section __TEXT,__objc_methtype,cstring_literals
+; CHECK-NEXT: L_private16:
More information about the llvm-commits
mailing list