| Chris Lattner | 17ec6b1 | 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" | 
| Chris Lattner | 72afa95 | 2010-05-08 19:54:22 +0000 | [diff] [blame] | 18 | #include "llvm/ADT/DenseSet.h" | 
| Chris Lattner | 765ac33 | 2009-12-03 01:10:05 +0000 | [diff] [blame] | 19 | #include "X86MachineFunctionInfo.h" | 
| Chris Lattner | 17ec6b1 | 2009-09-20 06:45:52 +0000 | [diff] [blame] | 20 |  | 
|  | 21 | namespace llvm { | 
|  | 22 | class X86MachineFunctionInfo; | 
|  | 23 | class TargetData; | 
| Anton Korobeynikov | c9276df | 2010-02-12 15:28:40 +0000 | [diff] [blame] | 24 |  | 
| Chris Lattner | 17ec6b1 | 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 { | 
| Chris Lattner | 72afa95 | 2010-05-08 19:54:22 +0000 | [diff] [blame] | 28 | DenseSet<MCSymbol const *> Externals; | 
| Chris Lattner | 17ec6b1 | 2009-09-20 06:45:52 +0000 | [diff] [blame] | 29 | public: | 
| Chris Lattner | e397df7 | 2010-03-12 19:42:40 +0000 | [diff] [blame] | 30 | X86COFFMachineModuleInfo(const MachineModuleInfo &) {} | 
|  | 31 | virtual ~X86COFFMachineModuleInfo(); | 
| Anton Korobeynikov | c9276df | 2010-02-12 15:28:40 +0000 | [diff] [blame] | 32 |  | 
| Chris Lattner | 72afa95 | 2010-05-08 19:54:22 +0000 | [diff] [blame] | 33 | void addExternalFunction(MCSymbol* Symbol) { | 
|  | 34 | Externals.insert(Symbol); | 
| Chris Lattner | e397df7 | 2010-03-12 19:42:40 +0000 | [diff] [blame] | 35 | } | 
|  | 36 |  | 
| Chris Lattner | 72afa95 | 2010-05-08 19:54:22 +0000 | [diff] [blame] | 37 | typedef DenseSet<MCSymbol const *>::const_iterator externals_iterator; | 
|  | 38 | externals_iterator externals_begin() const { return Externals.begin(); } | 
|  | 39 | externals_iterator externals_end() const { return Externals.end(); } | 
| Chris Lattner | 17ec6b1 | 2009-09-20 06:45:52 +0000 | [diff] [blame] | 40 | }; | 
|  | 41 |  | 
|  | 42 |  | 
|  | 43 |  | 
|  | 44 | } // end namespace llvm | 
|  | 45 |  | 
|  | 46 | #endif |