970096b473c011ca1d9323f78df69e8a3be7837b
[oota-llvm.git] / lib / Target / COFFTargetAsmInfo.cpp
1 //===-- COFFTargetAsmInfo.cpp - COFF 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 defines target asm properties related what form asm statements
11 // should take in general on COFF-based targets
12 //
13 //===----------------------------------------------------------------------===//
14
15 #include "llvm/Target/COFFTargetAsmInfo.h"
16 #include "llvm/ADT/SmallVector.h"
17 using namespace llvm;
18
19 COFFTargetAsmInfo::COFFTargetAsmInfo(const TargetMachine &TM)
20   : TargetAsmInfo(TM) {
21
22   GlobalPrefix = "_";
23   LCOMMDirective = "\t.lcomm\t";
24   COMMDirectiveTakesAlignment = false;
25   HasDotTypeDotSizeDirective = false;
26   HasSingleParameterDotFile = false;
27   HiddenDirective = NULL;
28   PrivateGlobalPrefix = "L";  // Prefix for private global symbols
29   WeakRefDirective = "\t.weak\t";
30   SetDirective = "\t.set\t";
31
32   // Set up DWARF directives
33   HasLEB128 = true;  // Target asm supports leb128 directives (little-endian)
34   AbsoluteDebugSectionOffsets = true;
35   AbsoluteEHSectionOffsets = false;
36   SupportsDebugInformation = true;
37   DwarfSectionOffsetDirective = "\t.secrel32\t";
38   DwarfAbbrevSection =  "\t.section\t.debug_abbrev,\"dr\"";
39   DwarfInfoSection =    "\t.section\t.debug_info,\"dr\"";
40   DwarfLineSection =    "\t.section\t.debug_line,\"dr\"";
41   DwarfFrameSection =   "\t.section\t.debug_frame,\"dr\"";
42   DwarfPubNamesSection ="\t.section\t.debug_pubnames,\"dr\"";
43   DwarfPubTypesSection ="\t.section\t.debug_pubtypes,\"dr\"";
44   DwarfStrSection =     "\t.section\t.debug_str,\"dr\"";
45   DwarfLocSection =     "\t.section\t.debug_loc,\"dr\"";
46   DwarfARangesSection = "\t.section\t.debug_aranges,\"dr\"";
47   DwarfRangesSection =  "\t.section\t.debug_ranges,\"dr\"";
48   DwarfMacroInfoSection = "\t.section\t.debug_macinfo,\"dr\"";
49 }
50