blob: 9de3dcd634956bdfdb779c92c9fe4c7984ed0e96 [file] [log] [blame]
Chris Lattner67c6b6e2009-09-20 06:45:52 +00001//===-- llvm/CodeGen/X86COFFMachineModuleInfo.h -----------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This is an MMI implementation for X86 COFF (windows) targets.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef X86COFF_MACHINEMODULEINFO_H
15#define X86COFF_MACHINEMODULEINFO_H
16
17#include "llvm/CodeGen/MachineModuleInfo.h"
18#include "llvm/ADT/StringSet.h"
Chris Lattnerbf108bd2009-12-03 01:10:05 +000019#include "X86MachineFunctionInfo.h"
Chris Lattner67c6b6e2009-09-20 06:45:52 +000020
21namespace llvm {
22 class X86MachineFunctionInfo;
23 class TargetData;
Anton Korobeynikov4dd162f2010-02-12 15:28:40 +000024
Chris Lattner67c6b6e2009-09-20 06:45:52 +000025/// X86COFFMachineModuleInfo - This is a MachineModuleInfoImpl implementation
26/// for X86 COFF targets.
27class X86COFFMachineModuleInfo : public MachineModuleInfoImpl {
28 StringSet<> CygMingStubs;
Anton Korobeynikov4dd162f2010-02-12 15:28:40 +000029 DenseMap<const Function*, unsigned> FnArgWords;
Chris Lattner67c6b6e2009-09-20 06:45:52 +000030public:
31 X86COFFMachineModuleInfo(const MachineModuleInfo &);
32 ~X86COFFMachineModuleInfo();
Anton Korobeynikov4dd162f2010-02-12 15:28:40 +000033
Chris Lattner5957c842010-01-18 00:59:24 +000034 void DecorateCygMingName(MCSymbol* &Name, MCContext &Ctx,
Chris Lattner4fb69f42010-01-16 00:51:39 +000035 const GlobalValue *GV, const TargetData &TD);
Chris Lattner67c6b6e2009-09-20 06:45:52 +000036 void DecorateCygMingName(SmallVectorImpl<char> &Name, const GlobalValue *GV,
37 const TargetData &TD);
Chris Lattner67c6b6e2009-09-20 06:45:52 +000038
Anton Korobeynikov4dd162f2010-02-12 15:28:40 +000039 void addExternalFunction(const StringRef& Name);
Chris Lattner67c6b6e2009-09-20 06:45:52 +000040 typedef StringSet<>::const_iterator stub_iterator;
41 stub_iterator stub_begin() const { return CygMingStubs.begin(); }
42 stub_iterator stub_end() const { return CygMingStubs.end(); }
Chris Lattner67c6b6e2009-09-20 06:45:52 +000043};
44
45
46
47} // end namespace llvm
48
49#endif