blob: aef4b220671e7e48dc8f8e1f68bd77c96588e53b [file] [log] [blame]
Chris Lattner621c44d2009-08-22 20:48:53 +00001//===-- MCAsmInfoDarwin.cpp - Darwin asm properties -------------*- C++ -*-===//
aslf80e6082008-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 Lattner621c44d2009-08-22 20:48:53 +000015#include "llvm/MC/MCAsmInfoDarwin.h"
aslf80e6082008-07-19 13:14:46 +000016using namespace llvm;
17
Chris Lattner50f82ef2010-01-20 06:34:14 +000018MCAsmInfoDarwin::MCAsmInfoDarwin() {
Chris Lattnerca072172009-06-19 00:08:39 +000019 // Common settings for all Darwin targets.
20 // Syntax:
21 GlobalPrefix = "_";
22 PrivateGlobalPrefix = "L";
Chris Lattner8886dc22009-09-16 01:46:41 +000023 LinkerPrivateGlobalPrefix = "l";
Bill Wendlingf8b61372010-06-29 21:24:00 +000024 LinkerWeakGlobalPrefix = "l";
Chris Lattnerca072172009-06-19 00:08:39 +000025 AllowQuotesInName = true;
26 HasSingleParameterDotFile = false;
Chris Lattner2dc6ddd2010-01-23 07:21:06 +000027 HasSubsectionsViaSymbols = true;
Chris Lattnerca072172009-06-19 00:08:39 +000028
Chris Lattnerca22f872009-08-11 22:31:42 +000029 AlignmentIsInBytes = false;
Rafael Espindola8fd77a12010-01-26 20:21:43 +000030 COMMDirectiveAlignmentIsInBytes = false;
Chris Lattnercae14fd2009-08-11 22:39:40 +000031 InlineAsmStart = " InlineAsm Start";
32 InlineAsmEnd = " InlineAsm End";
Chris Lattnerca22f872009-08-11 22:31:42 +000033
Chris Lattnerca072172009-06-19 00:08:39 +000034 // Directives:
35 WeakDefDirective = "\t.weak_definition ";
36 WeakRefDirective = "\t.weak_reference ";
Chris Lattner9364e722009-08-11 22:17:31 +000037 ZeroDirective = "\t.space\t"; // ".space N" emits N zeros.
Chris Lattner87edd272010-01-19 02:09:44 +000038 HasMachoZeroFillDirective = true; // Uses .zerofill
Eric Christopher2d4ea3e2010-05-20 00:49:07 +000039 HasMachoTBSSDirective = true; // Uses .tbss
Chris Lattner2f2fe052010-01-19 04:34:02 +000040 HasStaticCtorDtorReferenceInStaticMode = true;
Chris Lattner10bcc6b2010-01-23 06:53:23 +000041
42 HiddenVisibilityAttr = MCSA_PrivateExtern;
43 // Doesn't support protected visibility.
44 ProtectedVisibilityAttr = MCSA_Global;
Chris Lattner10bcc6b2010-01-23 06:53:23 +000045
Chris Lattnerca22f872009-08-11 22:31:42 +000046 HasDotTypeDotSizeDirective = false;
Chris Lattnerd7b6c9c2010-01-23 05:51:36 +000047 HasNoDeadStrip = true;
aslf80e6082008-07-19 13:14:46 +000048}
49