Give TargetAsmInfo a virtual dtor, add a new getSectionForFunction method.
[oota-llvm.git] / lib / Target / TargetAsmInfo.cpp
1 //===-- TargetAsmInfo.cpp - Asm Info ---------------------------------------==//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file was developed by James M. Laskey and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines target asm properties related what form asm statements
11 // should take.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #include "llvm/Target/TargetAsmInfo.h"
16
17 using namespace llvm;
18
19 TargetAsmInfo::TargetAsmInfo() :
20   TextSection(".text"),
21   DataSection(".data"),
22   AddressSize(4),
23   NeedsSet(false),
24   CommentString("#"),
25   GlobalPrefix(""),
26   PrivateGlobalPrefix("."),
27   GlobalVarAddrPrefix(""),
28   GlobalVarAddrSuffix(""),
29   FunctionAddrPrefix(""),
30   FunctionAddrSuffix(""),
31   InlineAsmStart("#APP"),
32   InlineAsmEnd("#NO_APP"),
33   ZeroDirective("\t.zero\t"),
34   ZeroDirectiveSuffix(0),
35   AsciiDirective("\t.ascii\t"),
36   AscizDirective("\t.asciz\t"),
37   Data8bitsDirective("\t.byte\t"),
38   Data16bitsDirective("\t.short\t"),
39   Data32bitsDirective("\t.long\t"),
40   Data64bitsDirective("\t.quad\t"),
41   AlignDirective("\t.align\t"),
42   AlignmentIsInBytes(true),
43   SwitchToSectionDirective("\t.section\t"),
44   TextSectionStartSuffix(""),
45   DataSectionStartSuffix(""),
46   SectionEndDirectiveSuffix(0),
47   ConstantPoolSection("\t.section .rodata\n"),
48   JumpTableDataSection("\t.section .rodata\n"),
49   JumpTableTextSection("\t.text\n"),
50   JumpTableDirective(0),
51   StaticCtorsSection("\t.section .ctors,\"aw\",@progbits"),
52   StaticDtorsSection("\t.section .dtors,\"aw\",@progbits"),
53   FourByteConstantSection(0),
54   EightByteConstantSection(0),
55   SixteenByteConstantSection(0),
56   SetDirective(0),
57   LCOMMDirective(0),
58   COMMDirective("\t.comm\t"),
59   COMMDirectiveTakesAlignment(true),
60   HasDotTypeDotSizeDirective(true),
61   UsedDirective(0),
62   HasLEB128(false),
63   HasDotLoc(false),
64   HasDotFile(false),
65   DwarfAbbrevSection(".debug_abbrev"),
66   DwarfInfoSection(".debug_info"),
67   DwarfLineSection(".debug_line"),
68   DwarfFrameSection(".debug_frame"),
69   DwarfPubNamesSection(".debug_pubnames"),
70   DwarfPubTypesSection(".debug_pubtypes"),
71   DwarfStrSection(".debug_str"),
72   DwarfLocSection(".debug_loc"),
73   DwarfARangesSection(".debug_aranges"),
74   DwarfRangesSection(".debug_ranges"),
75   DwarfMacInfoSection(".debug_macinfo")
76 {}
77
78 TargetAsmInfo::~TargetAsmInfo() {
79 }