From c041a738060ac6a2169bd8d69371fee03e75088d Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 28 Jul 2009 21:53:17 +0000 Subject: [PATCH] Darwin outputs (DW_EH_PE_pcrel | DW_EH_PE_indirect | DW_EH_PE_sdata4) when we're dealing with Data. llvm-svn: 77372 --- lib/Target/X86/X86TargetAsmInfo.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/Target/X86/X86TargetAsmInfo.cpp b/lib/Target/X86/X86TargetAsmInfo.cpp index b4f503b255c..277c3cbba73 100644 --- a/lib/Target/X86/X86TargetAsmInfo.cpp +++ b/lib/Target/X86/X86TargetAsmInfo.cpp @@ -94,10 +94,13 @@ X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM): unsigned X86DarwinTargetAsmInfo::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); + 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; + return DW_EH_PE_absptr; }