llvm-6502/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
Chris Lattner 18a4c16726 move dwarf debug info section selection stuff from TAI to
TLOF, unifying all the dwarf targets at the same time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77889 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-02 07:24:22 +00:00

59 lines
1.7 KiB
C++

//===-- PPCTargetAsmInfo.cpp - PPC asm properties ---------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file contains the declarations of the DarwinTargetAsmInfo properties.
//
//===----------------------------------------------------------------------===//
#include "PPCTargetAsmInfo.h"
#include "PPCTargetMachine.h"
#include "llvm/Function.h"
#include "llvm/Support/Dwarf.h"
using namespace llvm;
using namespace llvm::dwarf;
PPCDarwinTargetAsmInfo::PPCDarwinTargetAsmInfo(const PPCTargetMachine &TM) :
PPCTargetAsmInfo<DarwinTargetAsmInfo>(TM) {
PCSymbol = ".";
CommentString = ";";
UsedDirective = "\t.no_dead_strip\t";
SupportsExceptionHandling = true;
GlobalEHDirective = "\t.globl\t";
SupportsWeakOmittedEHFrame = false;
}
PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM) :
PPCTargetAsmInfo<TargetAsmInfo>(TM) {
CommentString = "#";
GlobalPrefix = "";
PrivateGlobalPrefix = ".L";
UsedDirective = "\t# .no_dead_strip\t";
WeakRefDirective = "\t.weak\t";
// Debug Information
AbsoluteDebugSectionOffsets = true;
SupportsDebugInformation = true;
PCSymbol = ".";
// Set up DWARF directives
HasLEB128 = true; // Target asm supports leb128 directives (little-endian)
// Exceptions handling
if (!TM.getSubtargetImpl()->isPPC64())
SupportsExceptionHandling = true;
AbsoluteEHSectionOffsets = false;
}
// Instantiate default implementation.
TEMPLATE_INSTANTIATION(class PPCTargetAsmInfo<TargetAsmInfo>);