Chris Lattner | 67c6b6e | 2009-09-20 06:45:52 +0000 | [diff] [blame] | 1 | //===-- 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 Lattner | bf108bd | 2009-12-03 01:10:05 +0000 | [diff] [blame] | 19 | #include "X86MachineFunctionInfo.h" |
Chris Lattner | 67c6b6e | 2009-09-20 06:45:52 +0000 | [diff] [blame] | 20 | |
| 21 | namespace llvm { |
| 22 | class X86MachineFunctionInfo; |
| 23 | class TargetData; |
Anton Korobeynikov | 4dd162f | 2010-02-12 15:28:40 +0000 | [diff] [blame] | 24 | |
Chris Lattner | 67c6b6e | 2009-09-20 06:45:52 +0000 | [diff] [blame] | 25 | /// X86COFFMachineModuleInfo - This is a MachineModuleInfoImpl implementation |
| 26 | /// for X86 COFF targets. |
| 27 | class X86COFFMachineModuleInfo : public MachineModuleInfoImpl { |
| 28 | StringSet<> CygMingStubs; |
Chris Lattner | 67c6b6e | 2009-09-20 06:45:52 +0000 | [diff] [blame] | 29 | public: |
| 30 | X86COFFMachineModuleInfo(const MachineModuleInfo &); |
| 31 | ~X86COFFMachineModuleInfo(); |
Anton Korobeynikov | 4dd162f | 2010-02-12 15:28:40 +0000 | [diff] [blame] | 32 | |
Chris Lattner | 5957c84 | 2010-01-18 00:59:24 +0000 | [diff] [blame] | 33 | void DecorateCygMingName(MCSymbol* &Name, MCContext &Ctx, |
Chris Lattner | 4fb69f4 | 2010-01-16 00:51:39 +0000 | [diff] [blame] | 34 | const GlobalValue *GV, const TargetData &TD); |
Chris Lattner | 67c6b6e | 2009-09-20 06:45:52 +0000 | [diff] [blame] | 35 | void DecorateCygMingName(SmallVectorImpl<char> &Name, const GlobalValue *GV, |
| 36 | const TargetData &TD); |
Chris Lattner | 67c6b6e | 2009-09-20 06:45:52 +0000 | [diff] [blame] | 37 | |
Anton Korobeynikov | 4dd162f | 2010-02-12 15:28:40 +0000 | [diff] [blame] | 38 | void addExternalFunction(const StringRef& Name); |
Chris Lattner | 67c6b6e | 2009-09-20 06:45:52 +0000 | [diff] [blame] | 39 | typedef StringSet<>::const_iterator stub_iterator; |
| 40 | stub_iterator stub_begin() const { return CygMingStubs.begin(); } |
| 41 | stub_iterator stub_end() const { return CygMingStubs.end(); } |
Chris Lattner | 67c6b6e | 2009-09-20 06:45:52 +0000 | [diff] [blame] | 42 | }; |
| 43 | |
| 44 | |
| 45 | |
| 46 | } // end namespace llvm |
| 47 | |
| 48 | #endif |