remove the x86/ppc impls of getEHGlobalPrefix, which is already dead.
[oota-llvm.git] / lib / Target / PowerPC / PPCTargetAsmInfo.cpp
1 //===-- PPCTargetAsmInfo.cpp - PPC asm properties ---------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains the declarations of the DarwinTargetAsmInfo properties.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #include "PPCTargetAsmInfo.h"
15 #include "PPCTargetMachine.h"
16 #include "llvm/Function.h"
17 #include "llvm/Support/Dwarf.h"
18
19 using namespace llvm;
20 using namespace llvm::dwarf;
21
22 PPCDarwinTargetAsmInfo::PPCDarwinTargetAsmInfo(const PPCTargetMachine &TM) :
23   PPCTargetAsmInfo<DarwinTargetAsmInfo>(TM) {
24   PCSymbol = ".";
25   CommentString = ";";
26   UsedDirective = "\t.no_dead_strip\t";
27   SupportsExceptionHandling = true;
28   
29   DwarfEHFrameSection =
30    ".section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support";
31   GlobalEHDirective = "\t.globl\t";
32   SupportsWeakOmittedEHFrame = false;
33 }
34
35 PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM) :
36   PPCTargetAsmInfo<ELFTargetAsmInfo>(TM) {
37   CommentString = "#";
38   GlobalPrefix = "";
39   PrivateGlobalPrefix = ".L";
40   UsedDirective = "\t# .no_dead_strip\t";
41   WeakRefDirective = "\t.weak\t";
42
43   // Debug Information
44   AbsoluteDebugSectionOffsets = true;
45   SupportsDebugInformation = true;
46   DwarfAbbrevSection =  "\t.section\t.debug_abbrev,\"\",@progbits";
47   DwarfInfoSection =    "\t.section\t.debug_info,\"\",@progbits";
48   DwarfLineSection =    "\t.section\t.debug_line,\"\",@progbits";
49   DwarfFrameSection =   "\t.section\t.debug_frame,\"\",@progbits";
50   DwarfPubNamesSection ="\t.section\t.debug_pubnames,\"\",@progbits";
51   DwarfPubTypesSection ="\t.section\t.debug_pubtypes,\"\",@progbits";
52   DwarfStrSection =     "\t.section\t.debug_str,\"\",@progbits";
53   DwarfLocSection =     "\t.section\t.debug_loc,\"\",@progbits";
54   DwarfARangesSection = "\t.section\t.debug_aranges,\"\",@progbits";
55   DwarfRangesSection =  "\t.section\t.debug_ranges,\"\",@progbits";
56   DwarfMacroInfoSection = "\t.section\t.debug_macinfo,\"\",@progbits";
57
58   PCSymbol = ".";
59
60   // Set up DWARF directives
61   HasLEB128 = true;  // Target asm supports leb128 directives (little-endian)
62
63   // Exceptions handling
64   if (!TM.getSubtargetImpl()->isPPC64())
65     SupportsExceptionHandling = true;
66   AbsoluteEHSectionOffsets = false;
67   DwarfEHFrameSection = "\t.section\t.eh_frame,\"aw\",@progbits";
68 }
69
70
71 // Instantiate default implementation.
72 TEMPLATE_INSTANTIATION(class PPCTargetAsmInfo<TargetAsmInfo>);