]> CyberLeo.Net >> Repos - FreeBSD/releng/9.0.git/blob - contrib/llvm/lib/MC/MCAsmInfoDarwin.cpp
Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
[FreeBSD/releng/9.0.git] / contrib / llvm / lib / MC / MCAsmInfoDarwin.cpp
1 //===-- MCAsmInfoDarwin.cpp - Darwin 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 Darwin-based targets
12 //
13 //===----------------------------------------------------------------------===//
14
15 #include "llvm/MC/MCAsmInfoDarwin.h"
16 #include "llvm/MC/MCContext.h"
17 #include "llvm/MC/MCExpr.h"
18 #include "llvm/MC/MCStreamer.h"
19 using namespace llvm;
20
21 MCAsmInfoDarwin::MCAsmInfoDarwin() {
22   // Common settings for all Darwin targets.
23   // Syntax:
24   GlobalPrefix = "_";
25   PrivateGlobalPrefix = "L";
26   LinkerPrivateGlobalPrefix = "l";
27   AllowQuotesInName = true;
28   HasSingleParameterDotFile = false;
29   HasSubsectionsViaSymbols = true;
30
31   AlignmentIsInBytes = false;
32   COMMDirectiveAlignmentIsInBytes = false;
33   InlineAsmStart = " InlineAsm Start";
34   InlineAsmEnd = " InlineAsm End";
35
36   // Directives:
37   WeakDefDirective = "\t.weak_definition ";
38   WeakRefDirective = "\t.weak_reference ";
39   ZeroDirective = "\t.space\t";  // ".space N" emits N zeros.
40   HasMachoZeroFillDirective = true;  // Uses .zerofill
41   HasMachoTBSSDirective = true; // Uses .tbss
42   StructorOutputOrder = Structors::PriorityOrder;
43   HasStaticCtorDtorReferenceInStaticMode = true;
44
45   CodeBegin = "L$start$code$";
46   DataBegin = "L$start$data$";
47   JT8Begin  = "L$start$jt8$";
48   JT16Begin = "L$start$jt16$";
49   JT32Begin = "L$start$jt32$";
50   SupportsDataRegions = true;
51
52   // FIXME: Darwin 10 and newer don't need this.
53   LinkerRequiresNonEmptyDwarfLines = true;
54
55   // FIXME: Change this once MC is the system assembler.
56   HasAggressiveSymbolFolding = false;
57
58   HiddenVisibilityAttr = MCSA_PrivateExtern;
59   HiddenDeclarationVisibilityAttr = MCSA_Invalid;
60   // Doesn't support protected visibility.
61   ProtectedVisibilityAttr = MCSA_Global;
62   
63   HasDotTypeDotSizeDirective = false;
64   HasNoDeadStrip = true;
65   HasSymbolResolver = true;
66
67   DwarfRequiresRelocationForSectionOffset = false;
68   DwarfUsesLabelOffsetForRanges = false;
69 }