2009-10-14 17:57:32 +00:00
|
|
|
//===-- MCAsmInfoDarwin.cpp - Darwin asm properties -------------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file defines target asm properties related what form asm statements
|
|
|
|
// should take in general on Darwin-based targets
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "llvm/MC/MCAsmInfoDarwin.h"
|
2011-05-02 19:34:44 +00:00
|
|
|
#include "llvm/MC/MCContext.h"
|
|
|
|
#include "llvm/MC/MCExpr.h"
|
|
|
|
#include "llvm/MC/MCStreamer.h"
|
2009-10-14 17:57:32 +00:00
|
|
|
using namespace llvm;
|
|
|
|
|
2012-08-15 19:34:23 +00:00
|
|
|
void MCAsmInfoDarwin::anchor() { }
|
2012-04-14 13:54:10 +00:00
|
|
|
|
2009-10-14 17:57:32 +00:00
|
|
|
MCAsmInfoDarwin::MCAsmInfoDarwin() {
|
|
|
|
// Common settings for all Darwin targets.
|
|
|
|
// Syntax:
|
|
|
|
GlobalPrefix = "_";
|
|
|
|
PrivateGlobalPrefix = "L";
|
|
|
|
LinkerPrivateGlobalPrefix = "l";
|
|
|
|
AllowQuotesInName = true;
|
|
|
|
HasSingleParameterDotFile = false;
|
2010-01-23 11:09:33 +00:00
|
|
|
HasSubsectionsViaSymbols = true;
|
2009-10-14 17:57:32 +00:00
|
|
|
|
|
|
|
AlignmentIsInBytes = false;
|
2010-02-16 09:30:23 +00:00
|
|
|
COMMDirectiveAlignmentIsInBytes = false;
|
2012-12-02 13:10:19 +00:00
|
|
|
LCOMMDirectiveAlignmentType = LCOMM::Log2Alignment;
|
2009-10-14 17:57:32 +00:00
|
|
|
InlineAsmStart = " InlineAsm Start";
|
|
|
|
InlineAsmEnd = " InlineAsm End";
|
|
|
|
|
|
|
|
// Directives:
|
|
|
|
WeakDefDirective = "\t.weak_definition ";
|
|
|
|
WeakRefDirective = "\t.weak_reference ";
|
|
|
|
ZeroDirective = "\t.space\t"; // ".space N" emits N zeros.
|
2010-01-23 11:09:33 +00:00
|
|
|
HasMachoZeroFillDirective = true; // Uses .zerofill
|
2010-05-27 15:15:58 +00:00
|
|
|
HasMachoTBSSDirective = true; // Uses .tbss
|
2010-01-23 11:09:33 +00:00
|
|
|
HasStaticCtorDtorReferenceInStaticMode = true;
|
2011-02-20 12:57:14 +00:00
|
|
|
|
|
|
|
// FIXME: Darwin 10 and newer don't need this.
|
|
|
|
LinkerRequiresNonEmptyDwarfLines = true;
|
|
|
|
|
|
|
|
// FIXME: Change this once MC is the system assembler.
|
|
|
|
HasAggressiveSymbolFolding = false;
|
|
|
|
|
2010-01-23 11:09:33 +00:00
|
|
|
HiddenVisibilityAttr = MCSA_PrivateExtern;
|
2011-02-26 22:03:50 +00:00
|
|
|
HiddenDeclarationVisibilityAttr = MCSA_Invalid;
|
2012-04-14 13:54:10 +00:00
|
|
|
|
2010-01-23 11:09:33 +00:00
|
|
|
// Doesn't support protected visibility.
|
2012-04-14 13:54:10 +00:00
|
|
|
ProtectedVisibilityAttr = MCSA_Invalid;
|
2012-08-15 19:34:23 +00:00
|
|
|
|
2009-10-14 17:57:32 +00:00
|
|
|
HasDotTypeDotSizeDirective = false;
|
2010-01-23 11:09:33 +00:00
|
|
|
HasNoDeadStrip = true;
|
2011-02-20 12:57:14 +00:00
|
|
|
HasSymbolResolver = true;
|
2010-09-17 15:48:55 +00:00
|
|
|
|
2012-08-15 19:34:23 +00:00
|
|
|
DwarfUsesRelocationsAcrossSections = false;
|
2009-10-14 17:57:32 +00:00
|
|
|
}
|