aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/PowerPC/PPCTargetAsmInfo.cpp')
-rw-r--r--lib/Target/PowerPC/PPCTargetAsmInfo.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/Target/PowerPC/PPCTargetAsmInfo.cpp b/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
index 4151064c6a..c69e591a66 100644
--- a/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
+++ b/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
@@ -89,12 +89,21 @@ PPCDarwinTargetAsmInfo::PreferredEHDataFormat(DwarfEncoding::Target Reason,
return DW_EH_PE_absptr;
}
+const char *
+PPCDarwinTargetAsmInfo::getEHGlobalPrefix() const
+{
+ const PPCSubtarget* Subtarget = &TM.getSubtarget<PPCSubtarget>();
+ if (Subtarget->getDarwinVers() > 9)
+ return PrivateGlobalPrefix;
+ else
+ return "";
+}
PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM) :
PPCTargetAsmInfo<ELFTargetAsmInfo>(TM) {
CommentString = "#";
GlobalPrefix = "";
- PrivateGlobalPrefix = "";
+ PrivateGlobalPrefix = ".L";
ConstantPoolSection = "\t.section .rodata.cst4\t";
JumpTableDataSection = ".section .rodata.cst4";
CStringSection = ".rodata.str";