LLVM API Documentation
00001 //===-- DarwinTargetAsmInfo.cpp - Darwin asm properties ---------*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file defines target asm properties related what form asm statements 00011 // should take in general on Darwin-based targets 00012 // 00013 //===----------------------------------------------------------------------===// 00014 00015 #include "llvm/Target/DarwinTargetAsmInfo.h" 00016 using namespace llvm; 00017 00018 DarwinTargetAsmInfo::DarwinTargetAsmInfo() { 00019 // Common settings for all Darwin targets. 00020 // Syntax: 00021 GlobalPrefix = "_"; 00022 PrivateGlobalPrefix = "L"; 00023 LinkerPrivateGlobalPrefix = "l"; // Marker for some ObjC metadata 00024 NeedsSet = true; 00025 NeedsIndirectEncoding = true; 00026 AllowQuotesInName = true; 00027 HasSingleParameterDotFile = false; 00028 00029 AlignmentIsInBytes = false; 00030 InlineAsmStart = " InlineAsm Start"; 00031 InlineAsmEnd = " InlineAsm End"; 00032 00033 // In non-PIC modes, emit a special label before jump tables so that the 00034 // linker can perform more accurate dead code stripping. We do not check the 00035 // relocation model here since it can be overridden later. 00036 JumpTableSpecialLabelPrefix = "l"; 00037 00038 // Directives: 00039 WeakDefDirective = "\t.weak_definition "; 00040 WeakRefDirective = "\t.weak_reference "; 00041 HiddenDirective = "\t.private_extern "; 00042 LCOMMDirective = "\t.lcomm\t"; 00043 ZeroDirective = "\t.space\t"; // ".space N" emits N zeros. 00044 ZeroFillDirective = "\t.zerofill\t"; // Uses .zerofill 00045 SetDirective = "\t.set"; 00046 ProtectedDirective = "\t.globl\t"; 00047 HasDotTypeDotSizeDirective = false; 00048 UsedDirective = "\t.no_dead_strip\t"; 00049 00050 // _foo.eh symbols are currently always exported so that the linker knows 00051 // about them. This is not necessary on 10.6 and later, but it 00052 // doesn't hurt anything. 00053 // FIXME: I need to get this from Triple. 00054 Is_EHSymbolPrivate = false; 00055 GlobalEHDirective = "\t.globl\t"; 00056 SupportsWeakOmittedEHFrame = false; 00057 00058 } 00059