2009-08-22 20:48:53 +00:00
|
|
|
//===-- MCAsmInfoDarwin.cpp - Darwin asm properties -------------*- C++ -*-===//
|
2008-07-19 13:14:46 +00: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-22 20:48:53 +00:00
|
|
|
#include "llvm/MC/MCAsmInfoDarwin.h"
|
2008-07-19 13:14:46 +00:00
|
|
|
using namespace llvm;
|
|
|
|
|
2010-01-20 06:34:14 +00:00
|
|
|
MCAsmInfoDarwin::MCAsmInfoDarwin() {
|
2009-06-19 00:08:39 +00:00
|
|
|
// Common settings for all Darwin targets.
|
|
|
|
// Syntax:
|
|
|
|
GlobalPrefix = "_";
|
|
|
|
PrivateGlobalPrefix = "L";
|
2009-09-16 01:46:41 +00:00
|
|
|
LinkerPrivateGlobalPrefix = "l";
|
2009-06-19 00:08:39 +00:00
|
|
|
NeedsSet = true;
|
|
|
|
AllowQuotesInName = true;
|
|
|
|
HasSingleParameterDotFile = false;
|
|
|
|
|
2009-08-11 22:31:42 +00:00
|
|
|
AlignmentIsInBytes = false;
|
2009-08-11 22:39:40 +00:00
|
|
|
InlineAsmStart = " InlineAsm Start";
|
|
|
|
InlineAsmEnd = " InlineAsm End";
|
2009-08-11 22:31:42 +00:00
|
|
|
|
2009-06-19 00:08:39 +00:00
|
|
|
// Directives:
|
|
|
|
WeakDefDirective = "\t.weak_definition ";
|
|
|
|
WeakRefDirective = "\t.weak_reference ";
|
|
|
|
HiddenDirective = "\t.private_extern ";
|
2009-08-11 22:17:31 +00:00
|
|
|
ZeroDirective = "\t.space\t"; // ".space N" emits N zeros.
|
2010-01-19 02:09:44 +00:00
|
|
|
HasMachoZeroFillDirective = true; // Uses .zerofill
|
2010-01-19 04:34:02 +00:00
|
|
|
HasStaticCtorDtorReferenceInStaticMode = true;
|
2009-08-11 22:22:44 +00:00
|
|
|
SetDirective = "\t.set";
|
|
|
|
ProtectedDirective = "\t.globl\t";
|
2009-08-11 22:31:42 +00:00
|
|
|
HasDotTypeDotSizeDirective = false;
|
2010-01-23 05:51:36 +00:00
|
|
|
HasNoDeadStrip = true;
|
2010-01-19 06:25:51 +00:00
|
|
|
// Note: Even though darwin has the .lcomm directive, it is just a synonym for
|
|
|
|
// zerofill, so we prefer to use .zerofill.
|
2009-08-11 22:06:07 +00:00
|
|
|
|
2009-08-13 17:03:38 +00:00
|
|
|
// _foo.eh symbols are currently always exported so that the linker knows
|
|
|
|
// about them. This is not necessary on 10.6 and later, but it
|
|
|
|
// doesn't hurt anything.
|
|
|
|
// FIXME: I need to get this from Triple.
|
|
|
|
Is_EHSymbolPrivate = false;
|
2009-08-11 22:31:42 +00:00
|
|
|
GlobalEHDirective = "\t.globl\t";
|
|
|
|
SupportsWeakOmittedEHFrame = false;
|
2008-07-19 13:14:46 +00:00
|
|
|
}
|
|
|
|
|