blob: 526ad0da42aa35e98183ede33979e9564ade7468 [file] [log] [blame]
Chris Lattner7b26fce2009-08-22 20:48:53 +00001//===-- MCAsmInfoDarwin.cpp - Darwin asm properties -------------*- C++ -*-===//
Anton Korobeynikovc1874382008-07-19 13:14:46 +00002//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file defines target asm properties related what form asm statements
11// should take in general on Darwin-based targets
12//
13//===----------------------------------------------------------------------===//
14
Chris Lattner7b26fce2009-08-22 20:48:53 +000015#include "llvm/MC/MCAsmInfoDarwin.h"
Anton Korobeynikovc1874382008-07-19 13:14:46 +000016using namespace llvm;
17
Chris Lattner2b4364f2010-01-20 06:34:14 +000018MCAsmInfoDarwin::MCAsmInfoDarwin() {
Chris Lattner8284b662009-06-19 00:08:39 +000019 // Common settings for all Darwin targets.
20 // Syntax:
21 GlobalPrefix = "_";
22 PrivateGlobalPrefix = "L";
Chris Lattnerb8666022009-09-16 01:46:41 +000023 LinkerPrivateGlobalPrefix = "l";
Chris Lattner8284b662009-06-19 00:08:39 +000024 AllowQuotesInName = true;
25 HasSingleParameterDotFile = false;
Chris Lattner76bdea32010-01-23 07:21:06 +000026 HasSubsectionsViaSymbols = true;
Chris Lattner8284b662009-06-19 00:08:39 +000027
Chris Lattner54075a72009-08-11 22:31:42 +000028 AlignmentIsInBytes = false;
Rafael Espindoladcb03f02010-01-26 20:21:43 +000029 COMMDirectiveAlignmentIsInBytes = false;
Chris Lattnerabdcbc72009-08-11 22:39:40 +000030 InlineAsmStart = " InlineAsm Start";
31 InlineAsmEnd = " InlineAsm End";
Chris Lattner54075a72009-08-11 22:31:42 +000032
Chris Lattner8284b662009-06-19 00:08:39 +000033 // Directives:
34 WeakDefDirective = "\t.weak_definition ";
35 WeakRefDirective = "\t.weak_reference ";
Chris Lattnerd832c8e2009-08-11 22:17:31 +000036 ZeroDirective = "\t.space\t"; // ".space N" emits N zeros.
Chris Lattner1d371882010-01-19 02:09:44 +000037 HasMachoZeroFillDirective = true; // Uses .zerofill
Eric Christopher27e7ffc2010-05-20 00:49:07 +000038 HasMachoTBSSDirective = true; // Uses .tbss
Chris Lattnere9d28b12010-01-19 04:34:02 +000039 HasStaticCtorDtorReferenceInStaticMode = true;
Rafael Espindola1048e752010-12-04 00:31:13 +000040
41 // FIXME: Darwin 10 and newer don't need this.
42 LinkerRequiresNonEmptyDwarfLines = true;
Rafael Espindola44bbe362010-12-06 17:27:56 +000043
Rafael Espindolaa6cd2d82010-12-22 21:51:29 +000044 // FIXME: Change this once MC is the system assembler.
45 HasAggressiveSymbolFolding = false;
46
Chris Lattner0bfd2792010-01-23 06:53:23 +000047 HiddenVisibilityAttr = MCSA_PrivateExtern;
Stuart Hastingsbf836592011-02-23 02:27:05 +000048 HiddenDeclarationVisibilityAttr = MCSA_Invalid;
Chris Lattner0bfd2792010-01-23 06:53:23 +000049 // Doesn't support protected visibility.
50 ProtectedVisibilityAttr = MCSA_Global;
Chris Lattner0bfd2792010-01-23 06:53:23 +000051
Chris Lattner54075a72009-08-11 22:31:42 +000052 HasDotTypeDotSizeDirective = false;
Chris Lattner1deb09c2010-01-23 05:51:36 +000053 HasNoDeadStrip = true;
Kevin Enderby8be14412010-11-19 18:39:33 +000054 HasSymbolResolver = true;
Devang Patelea636392010-08-31 23:50:19 +000055
56 DwarfUsesAbsoluteLabelForStmtList = false;
Devang Patelda3ef852010-09-02 16:43:44 +000057 DwarfUsesLabelOffsetForRanges = false;
Anton Korobeynikovc1874382008-07-19 13:14:46 +000058}
59