2009-08-23 04:48:53 +08:00
|
|
|
//===-- MCAsmInfoDarwin.cpp - Darwin asm properties -------------*- C++ -*-===//
|
2008-07-19 21:14:46 +08:00
|
|
|
//
|
|
|
|
// 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
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2009-08-23 04:48:53 +08:00
|
|
|
#include "llvm/MC/MCAsmInfoDarwin.h"
|
2011-04-29 00:09:09 +08:00
|
|
|
#include "llvm/MC/MCContext.h"
|
|
|
|
#include "llvm/MC/MCExpr.h"
|
|
|
|
#include "llvm/MC/MCStreamer.h"
|
2008-07-19 21:14:46 +08:00
|
|
|
using namespace llvm;
|
|
|
|
|
2012-05-11 09:41:30 +08:00
|
|
|
void MCAsmInfoDarwin::anchor() { }
|
2011-12-20 10:50:00 +08:00
|
|
|
|
2010-01-20 14:34:14 +08:00
|
|
|
MCAsmInfoDarwin::MCAsmInfoDarwin() {
|
2009-06-19 08:08:39 +08:00
|
|
|
// Common settings for all Darwin targets.
|
|
|
|
// Syntax:
|
2014-03-29 15:33:24 +08:00
|
|
|
LinkerPrivateGlobalPrefix = "l";
|
2009-06-19 08:08:39 +08:00
|
|
|
HasSingleParameterDotFile = false;
|
2010-01-23 15:21:06 +08:00
|
|
|
HasSubsectionsViaSymbols = true;
|
2009-06-19 08:08:39 +08:00
|
|
|
|
2009-08-12 06:31:42 +08:00
|
|
|
AlignmentIsInBytes = false;
|
2010-01-27 04:21:43 +08:00
|
|
|
COMMDirectiveAlignmentIsInBytes = false;
|
2012-09-08 05:08:01 +08:00
|
|
|
LCOMMDirectiveAlignmentType = LCOMM::Log2Alignment;
|
2009-08-12 06:39:40 +08:00
|
|
|
InlineAsmStart = " InlineAsm Start";
|
|
|
|
InlineAsmEnd = " InlineAsm End";
|
2009-08-12 06:31:42 +08:00
|
|
|
|
2009-06-19 08:08:39 +08:00
|
|
|
// Directives:
|
2013-12-03 07:04:51 +08:00
|
|
|
HasWeakDefDirective = true;
|
2013-12-11 05:37:41 +08:00
|
|
|
HasWeakDefCanBeHiddenDirective = true;
|
2009-06-19 08:08:39 +08:00
|
|
|
WeakRefDirective = "\t.weak_reference ";
|
2009-08-12 06:17:31 +08:00
|
|
|
ZeroDirective = "\t.space\t"; // ".space N" emits N zeros.
|
2010-01-19 10:09:44 +08:00
|
|
|
HasMachoZeroFillDirective = true; // Uses .zerofill
|
2010-05-20 08:49:07 +08:00
|
|
|
HasMachoTBSSDirective = true; // Uses .tbss
|
2010-01-19 12:34:02 +08:00
|
|
|
HasStaticCtorDtorReferenceInStaticMode = true;
|
2010-12-04 08:31:13 +08:00
|
|
|
|
|
|
|
// FIXME: Darwin 10 and newer don't need this.
|
|
|
|
LinkerRequiresNonEmptyDwarfLines = true;
|
2010-12-07 01:27:56 +08:00
|
|
|
|
2010-12-23 05:51:29 +08:00
|
|
|
// FIXME: Change this once MC is the system assembler.
|
|
|
|
HasAggressiveSymbolFolding = false;
|
|
|
|
|
2010-01-23 14:53:23 +08:00
|
|
|
HiddenVisibilityAttr = MCSA_PrivateExtern;
|
2011-02-23 10:27:05 +08:00
|
|
|
HiddenDeclarationVisibilityAttr = MCSA_Invalid;
|
2011-11-29 10:39:58 +08:00
|
|
|
|
2010-01-23 14:53:23 +08:00
|
|
|
// Doesn't support protected visibility.
|
2011-11-29 10:39:58 +08:00
|
|
|
ProtectedVisibilityAttr = MCSA_Invalid;
|
2012-05-11 09:41:30 +08:00
|
|
|
|
2009-08-12 06:31:42 +08:00
|
|
|
HasDotTypeDotSizeDirective = false;
|
2010-01-23 13:51:36 +08:00
|
|
|
HasNoDeadStrip = true;
|
2010-09-01 07:50:19 +08:00
|
|
|
|
2012-06-22 09:25:12 +08:00
|
|
|
DwarfUsesRelocationsAcrossSections = false;
|
2014-02-13 22:44:26 +08:00
|
|
|
|
|
|
|
UseIntegratedAssembler = true;
|
2008-07-19 21:14:46 +08:00
|
|
|
}
|