blob: 0dfeb42f1a4d67af7107ad8e57a0cdaab7bc32a8 [file] [log] [blame]
Chad Rosiera20e1e72012-08-01 18:39:17 +00001//===-- X86coffmachinemoduleinfo.h - X86 COFF MMI Impl ----------*- C++ -*-===//
Chris Lattner67c6b6e2009-09-20 06:45:52 +00002//
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
Craig Topper79aa3412012-03-17 18:46:09 +000017#include "X86MachineFunctionInfo.h"
Chris Lattnerb54b9dd2010-05-08 19:54:22 +000018#include "llvm/ADT/DenseSet.h"
Chandler Carrutha1514e22012-12-04 07:12:27 +000019#include "llvm/CodeGen/MachineModuleInfo.h"
Chris Lattner67c6b6e2009-09-20 06:45:52 +000020
21namespace llvm {
22 class X86MachineFunctionInfo;
Micah Villmow3574eca2012-10-08 16:38:25 +000023 class DataLayout;
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 {
Chris Lattnerb54b9dd2010-05-08 19:54:22 +000028 DenseSet<MCSymbol const *> Externals;
Chris Lattner67c6b6e2009-09-20 06:45:52 +000029public:
Chris Lattnerc9747c02010-03-12 19:42:40 +000030 X86COFFMachineModuleInfo(const MachineModuleInfo &) {}
31 virtual ~X86COFFMachineModuleInfo();
Anton Korobeynikov4dd162f2010-02-12 15:28:40 +000032
Chris Lattnerb54b9dd2010-05-08 19:54:22 +000033 void addExternalFunction(MCSymbol* Symbol) {
34 Externals.insert(Symbol);
Chris Lattnerc9747c02010-03-12 19:42:40 +000035 }
Chad Rosiera20e1e72012-08-01 18:39:17 +000036
Chris Lattnerb54b9dd2010-05-08 19:54:22 +000037 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 Lattner67c6b6e2009-09-20 06:45:52 +000040};
41
42
43
44} // end namespace llvm
45
46#endif