implement DarwinTargetAsmInfo::getSectionForFunction, use it when outputting
[oota-llvm.git] / lib / Target / PowerPC / PPCTargetAsmInfo.h
1 //=====-- PPCTargetAsmInfo.h - PPC asm properties -------------*- C++ -*--====//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file was developed by James M. Laskey and is distributed under the
6 // University of Illinois Open Source License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains the declaration of the DarwinTargetAsmInfo class.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef PPCTARGETASMINFO_H
15 #define PPCTARGETASMINFO_H
16
17 #include "llvm/Target/TargetAsmInfo.h"
18
19 namespace llvm {
20
21   // Forward declaration.
22   class PPCTargetMachine;
23
24   struct DarwinTargetAsmInfo : public TargetAsmInfo {
25     DarwinTargetAsmInfo(const PPCTargetMachine &TM);
26     
27     /// getSectionForFunction - Return the section that we should emit the
28     /// specified function body into.  This defaults to 'TextSection'.  This
29     /// should most likely be overridden by the target to put linkonce/weak
30     /// functions into special sections.
31     virtual const char *getSectionForFunction(const Function &F) const;
32   };
33
34 } // namespace llvm
35
36 #endif