LLVM API Documentation

MCAsmInfoDarwin.cpp
Go to the documentation of this file.
00001 //===-- MCAsmInfoDarwin.cpp - Darwin asm properties -------------*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This file defines target asm properties related what form asm statements
00011 // should take in general on Darwin-based targets
00012 //
00013 //===----------------------------------------------------------------------===//
00014 
00015 #include "llvm/MC/MCAsmInfoDarwin.h"
00016 #include "llvm/MC/MCContext.h"
00017 #include "llvm/MC/MCExpr.h"
00018 #include "llvm/MC/MCStreamer.h"
00019 using namespace llvm;
00020 
00021 void MCAsmInfoDarwin::anchor() { }
00022 
00023 MCAsmInfoDarwin::MCAsmInfoDarwin() {
00024   // Common settings for all Darwin targets.
00025   // Syntax:
00026   LinkerPrivateGlobalPrefix = "l";
00027   HasSingleParameterDotFile = false;
00028   HasSubsectionsViaSymbols = true;
00029 
00030   AlignmentIsInBytes = false;
00031   COMMDirectiveAlignmentIsInBytes = false;
00032   LCOMMDirectiveAlignmentType = LCOMM::Log2Alignment;
00033   InlineAsmStart = " InlineAsm Start";
00034   InlineAsmEnd = " InlineAsm End";
00035 
00036   // Directives:
00037   HasWeakDefDirective = true;
00038   HasWeakDefCanBeHiddenDirective = true;
00039   WeakRefDirective = "\t.weak_reference ";
00040   ZeroDirective = "\t.space\t";  // ".space N" emits N zeros.
00041   HasMachoZeroFillDirective = true;  // Uses .zerofill
00042   HasMachoTBSSDirective = true; // Uses .tbss
00043   HasStaticCtorDtorReferenceInStaticMode = true;
00044 
00045   // FIXME: Darwin 10 and newer don't need this.
00046   LinkerRequiresNonEmptyDwarfLines = true;
00047 
00048   // FIXME: Change this once MC is the system assembler.
00049   HasAggressiveSymbolFolding = false;
00050 
00051   HiddenVisibilityAttr = MCSA_PrivateExtern;
00052   HiddenDeclarationVisibilityAttr = MCSA_Invalid;
00053 
00054   // Doesn't support protected visibility.
00055   ProtectedVisibilityAttr = MCSA_Invalid;
00056 
00057   HasDotTypeDotSizeDirective = false;
00058   HasNoDeadStrip = true;
00059 
00060   DwarfUsesRelocationsAcrossSections = false;
00061 
00062   UseIntegratedAssembler = true;
00063 }