[llvm-commits] [llvm] r125960 - in /llvm/trunk: lib/CodeGen/TargetLoweringObjectFileImpl.cpp test/CodeGen/X86/non-globl-eh-frame.ll
Bill Wendling
isanbard at gmail.com
Fri Feb 18 13:12:58 PST 2011
Author: void
Date: Fri Feb 18 15:12:58 2011
New Revision: 125960
URL: http://llvm.org/viewvc/llvm-project?rev=125960&view=rev
Log:
Reapply r114997 now that the buildbots have been updated.
Added:
llvm/trunk/test/CodeGen/X86/non-globl-eh-frame.ll
Modified:
llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
Modified: llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp?rev=125960&r1=125959&r2=125960&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp (original)
+++ llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp Fri Feb 18 15:12:58 2011
@@ -441,15 +441,11 @@
Triple T(((LLVMTargetMachine&)TM).getTargetTriple());
if (T.getOS() == Triple::Darwin) {
- switch (T.getDarwinMajorNumber()) {
- case 7: // 10.3 Panther.
- case 8: // 10.4 Tiger.
+ unsigned MajNum = T.getDarwinMajorNumber();
+ if (MajNum == 7 || MajNum == 8) // 10.3 Panther, 10.4 Tiger
CommDirectiveSupportsAlignment = false;
- break;
- case 9: // 10.5 Leopard.
- case 10: // 10.6 SnowLeopard.
- break;
- }
+ if (MajNum > 9) // 10.6 SnowLeopard
+ IsFunctionEHSymbolGlobal = false;
}
TargetLoweringObjectFile::Initialize(Ctx, TM);
Added: llvm/trunk/test/CodeGen/X86/non-globl-eh-frame.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/non-globl-eh-frame.ll?rev=125960&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/non-globl-eh-frame.ll (added)
+++ llvm/trunk/test/CodeGen/X86/non-globl-eh-frame.ll Fri Feb 18 15:12:58 2011
@@ -0,0 +1,24 @@
+; RUN: llc < %s -mtriple x86_64-apple-darwin10 -march x86 | not grep {{.globl\[\[:space:\]\]*__Z4funcv.eh}}
+; RUN: llc < %s -mtriple x86_64-apple-darwin9 -march x86 | FileCheck %s -check-prefix=DARWIN9
+
+%struct.__pointer_type_info_pseudo = type { %struct.__type_info_pseudo, i32, %"struct.std::type_info"* }
+%struct.__type_info_pseudo = type { i8*, i8* }
+%"struct.std::type_info" = type opaque
+
+ at .str = private constant [12 x i8] c"hello world\00", align 1
+ at _ZTIPc = external constant %struct.__pointer_type_info_pseudo
+
+define void @_Z4funcv() noreturn optsize ssp {
+entry:
+ %0 = tail call i8* @__cxa_allocate_exception(i64 8) nounwind
+ %1 = bitcast i8* %0 to i8**
+ store i8* getelementptr inbounds ([12 x i8]* @.str, i64 0, i64 0), i8** %1, align 8
+ tail call void @__cxa_throw(i8* %0, i8* bitcast (%struct.__pointer_type_info_pseudo* @_ZTIPc to i8*), void (i8*)* null) noreturn
+ unreachable
+}
+
+; DARWIN9: .globl __Z4funcv.eh
+
+declare i8* @__cxa_allocate_exception(i64) nounwind
+
+declare void @__cxa_throw(i8*, i8*, void (i8*)*) noreturn
More information about the llvm-commits
mailing list