From 41139f3ed4dbab637fc574b5fd444cd1349404af Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 28 Jul 2009 22:03:50 +0000 Subject: [PATCH] Output the correct format for Darwin. llvm-svn: 77376 --- lib/Target/PowerPC/PPCTargetAsmInfo.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/Target/PowerPC/PPCTargetAsmInfo.cpp b/lib/Target/PowerPC/PPCTargetAsmInfo.cpp index 5ddd120d931..39c8d21bbf1 100644 --- a/lib/Target/PowerPC/PPCTargetAsmInfo.cpp +++ b/lib/Target/PowerPC/PPCTargetAsmInfo.cpp @@ -41,12 +41,14 @@ PPCDarwinTargetAsmInfo::PPCDarwinTargetAsmInfo(const PPCTargetMachine &TM) : unsigned PPCDarwinTargetAsmInfo::PreferredEHDataFormat(DwarfEncoding::Target Reason, bool Global) const { - if (Reason == DwarfEncoding::Functions && Global) - return (DW_EH_PE_pcrel | DW_EH_PE_indirect | DW_EH_PE_sdata4); - else if (Reason == DwarfEncoding::CodeLabels || !Global) + if ((Reason == DwarfEncoding::Data || Reason == DwarfEncoding::Functions) + && Global) + return DW_EH_PE_pcrel | DW_EH_PE_indirect | DW_EH_PE_sdata4; + + if (Reason == DwarfEncoding::CodeLabels || !Global) return DW_EH_PE_pcrel; - else - return DW_EH_PE_absptr; + + return DW_EH_PE_absptr; } const char *PPCDarwinTargetAsmInfo::getEHGlobalPrefix() const {