1894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman//===-- llvm/Target/MBlazeTargetObjectFile.h - MBlaze Obj. Info -*- C++ -*-===//
2894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman//
3894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman//                     The LLVM Compiler Infrastructure
4894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman//
5894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman// This file is distributed under the University of Illinois Open Source
6894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman// License. See LICENSE.TXT for details.
7894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman//
8894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman//===----------------------------------------------------------------------===//
9894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman
10894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman#ifndef LLVM_TARGET_MBLAZE_TARGETOBJECTFILE_H
11894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman#define LLVM_TARGET_MBLAZE_TARGETOBJECTFILE_H
12894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman
13894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
14894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman
15894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Baumannamespace llvm {
16894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman
17894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman  class MBlazeTargetObjectFile : public TargetLoweringObjectFileELF {
18894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman    const MCSection *SmallDataSection;
19894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman    const MCSection *SmallBSSSection;
20894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman  public:
2119bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman
22894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman    void Initialize(MCContext &Ctx, const TargetMachine &TM);
23894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman
24894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman    /// IsGlobalInSmallSection - Return true if this global address should be
25894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman    /// placed into small data/bss section.
26894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman    bool IsGlobalInSmallSection(const GlobalValue *GV,
27894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman                                const TargetMachine &TM,
28894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman                                SectionKind Kind) const;
29894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman
30894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman    bool IsGlobalInSmallSection(const GlobalValue *GV,
3119bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman                                const TargetMachine &TM) const;
3219bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman
33894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman    const MCSection *SelectSectionForGlobal(const GlobalValue *GV,
34894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman                                            SectionKind Kind,
35894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman                                            Mangler *Mang,
36894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman                                            const TargetMachine &TM) const;
37894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman  };
38894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman} // end namespace llvm
39894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman
40894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman#endif
41