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 void MCAsmInfoDarwin::anchor() { }
23 MCAsmInfoDarwin::MCAsmInfoDarwin() {
24 // Common settings for all Darwin targets.
27 PrivateGlobalPrefix = "L";
28 LinkerPrivateGlobalPrefix = "l";
29 AllowQuotesInName = true;
30 HasSingleParameterDotFile = false;
31 HasSubsectionsViaSymbols = true;
33 AlignmentIsInBytes = false;
34 COMMDirectiveAlignmentIsInBytes = false;
35 LCOMMDirectiveAlignmentType = LCOMM::Log2Alignment;
36 InlineAsmStart = " InlineAsm Start";
37 InlineAsmEnd = " InlineAsm End";
40 WeakDefDirective = "\t.weak_definition ";
41 WeakRefDirective = "\t.weak_reference ";
42 ZeroDirective = "\t.space\t"; // ".space N" emits N zeros.
43 HasMachoZeroFillDirective = true; // Uses .zerofill
44 HasMachoTBSSDirective = true; // Uses .tbss
45 HasStaticCtorDtorReferenceInStaticMode = true;
47 // FIXME: Darwin 10 and newer don't need this.
48 LinkerRequiresNonEmptyDwarfLines = true;
50 // FIXME: Change this once MC is the system assembler.
51 HasAggressiveSymbolFolding = false;
53 HiddenVisibilityAttr = MCSA_PrivateExtern;
54 HiddenDeclarationVisibilityAttr = MCSA_Invalid;
56 // Doesn't support protected visibility.
57 ProtectedVisibilityAttr = MCSA_Invalid;
59 HasDotTypeDotSizeDirective = false;
60 HasNoDeadStrip = true;
61 HasSymbolResolver = true;
63 DwarfUsesRelocationsAcrossSections = false;