summaryrefslogtreecommitdiffstats
path: root/lib/Target/X86/X86COFFMachineModuleInfo.h
blob: 9de3dcd634956bdfdb779c92c9fe4c7984ed0e96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//===-- llvm/CodeGen/X86COFFMachineModuleInfo.h -----------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This is an MMI implementation for X86 COFF (windows) targets.
//
//===----------------------------------------------------------------------===//

#ifndef X86COFF_MACHINEMODULEINFO_H
#define X86COFF_MACHINEMODULEINFO_H

#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/ADT/StringSet.h"
#include "X86MachineFunctionInfo.h"

namespace llvm {
  class X86MachineFunctionInfo;
  class TargetData;

/// X86COFFMachineModuleInfo - This is a MachineModuleInfoImpl implementation
/// for X86 COFF targets.
class X86COFFMachineModuleInfo : public MachineModuleInfoImpl {
  StringSet<> CygMingStubs;
  DenseMap<const Function*, unsigned> FnArgWords;
public:
  X86COFFMachineModuleInfo(const MachineModuleInfo &);
  ~X86COFFMachineModuleInfo();

  void DecorateCygMingName(MCSymbol* &Name, MCContext &Ctx,
                           const GlobalValue *GV, const TargetData &TD);
  void DecorateCygMingName(SmallVectorImpl<char> &Name, const GlobalValue *GV,
                           const TargetData &TD);

  void addExternalFunction(const StringRef& Name);
  typedef StringSet<>::const_iterator stub_iterator;
  stub_iterator stub_begin() const { return CygMingStubs.begin(); }
  stub_iterator stub_end() const { return CygMingStubs.end(); }
};



} // end namespace llvm

#endif