Revert r224935 "Refactor duplicated code. No intended functionality change."
[oota-llvm.git] / 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 void MCAsmInfoDarwin::anchor() { }
22
23 MCAsmInfoDarwin::MCAsmInfoDarwin() {
24   // Common settings for all Darwin targets.
25   // Syntax:
26   LinkerPrivateGlobalPrefix = "l";
27   HasSingleParameterDotFile = false;
28   HasSubsectionsViaSymbols = true;
29
30   AlignmentIsInBytes = false;
31   COMMDirectiveAlignmentIsInBytes = false;
32   LCOMMDirectiveAlignmentType = LCOMM::Log2Alignment;
33   InlineAsmStart = " InlineAsm Start";
34   InlineAsmEnd = " InlineAsm End";
35
36   // Directives:
37   HasWeakDefDirective = true;
38   HasWeakDefCanBeHiddenDirective = true;
39   WeakRefDirective = "\t.weak_reference ";
40   ZeroDirective = "\t.space\t";  // ".space N" emits N zeros.
41   HasMachoZeroFillDirective = true;  // Uses .zerofill
42   HasMachoTBSSDirective = true; // Uses .tbss
43   HasStaticCtorDtorReferenceInStaticMode = true;
44
45   // FIXME: Change this once MC is the system assembler.
46   HasAggressiveSymbolFolding = false;
47
48   HiddenVisibilityAttr = MCSA_PrivateExtern;
49   HiddenDeclarationVisibilityAttr = MCSA_Invalid;
50
51   // Doesn't support protected visibility.
52   ProtectedVisibilityAttr = MCSA_Invalid;
53
54   HasDotTypeDotSizeDirective = false;
55   HasNoDeadStrip = true;
56
57   DwarfUsesRelocationsAcrossSections = false;
58
59   UseIntegratedAssembler = true;
60   SetDirectiveSuppressesReloc = true;
61 }