1 //===-- MCAsmInfoDarwin.cpp - Darwin asm properties -------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines target asm properties related what form asm statements
11 // should take in general on Darwin-based targets
13 //===----------------------------------------------------------------------===//
15 #include "llvm/MC/MCAsmInfoDarwin.h"
16 #include "llvm/MC/MCContext.h"
17 #include "llvm/MC/MCExpr.h"
18 #include "llvm/MC/MCStreamer.h"
21 MCAsmInfoDarwin::MCAsmInfoDarwin() {
22 // Common settings for all Darwin targets.
25 PrivateGlobalPrefix = "L";
26 LinkerPrivateGlobalPrefix = "l";
27 AllowQuotesInName = true;
28 HasSingleParameterDotFile = false;
29 HasSubsectionsViaSymbols = true;
31 AlignmentIsInBytes = false;
32 COMMDirectiveAlignmentIsInBytes = false;
33 InlineAsmStart = " InlineAsm Start";
34 InlineAsmEnd = " InlineAsm End";
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;
45 // FIXME: Darwin 10 and newer don't need this.
46 LinkerRequiresNonEmptyDwarfLines = true;
48 // FIXME: Change this once MC is the system assembler.
49 HasAggressiveSymbolFolding = false;
51 HiddenVisibilityAttr = MCSA_PrivateExtern;
52 HiddenDeclarationVisibilityAttr = MCSA_Invalid;
53 // Doesn't support protected visibility.
54 ProtectedVisibilityAttr = MCSA_Global;
56 HasDotTypeDotSizeDirective = false;
57 HasNoDeadStrip = true;
58 HasSymbolResolver = true;
60 DwarfRequiresRelocationForSectionOffset = false;
61 DwarfUsesLabelOffsetForRanges = false;