X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FTarget%2FX86%2FX86COFFMachineModuleInfo.h;h=0dfeb42f1a4d67af7107ad8e57a0cdaab7bc32a8;hb=9360e64e60f600bff98dbff96fabaab536947f86;hp=1bd31b8520330af670f73c5930c9f90c338a55e2;hpb=7896c9f436a4eda5ec15e882a7505ba482a2fcd0;p=oota-llvm.git diff --git a/lib/Target/X86/X86COFFMachineModuleInfo.h b/lib/Target/X86/X86COFFMachineModuleInfo.h index 1bd31b85203..0dfeb42f1a4 100644 --- a/lib/Target/X86/X86COFFMachineModuleInfo.h +++ b/lib/Target/X86/X86COFFMachineModuleInfo.h @@ -1,4 +1,4 @@ -//===-- llvm/CodeGen/X86COFFMachineModuleInfo.h -----------------*- C++ -*-===// +//===-- X86coffmachinemoduleinfo.h - X86 COFF MMI Impl ----------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -14,51 +14,29 @@ #ifndef X86COFF_MACHINEMODULEINFO_H #define X86COFF_MACHINEMODULEINFO_H +#include "X86MachineFunctionInfo.h" +#include "llvm/ADT/DenseSet.h" #include "llvm/CodeGen/MachineModuleInfo.h" -#include "llvm/ADT/StringSet.h" -#include "X86MachinefunctionInfo.h" namespace llvm { class X86MachineFunctionInfo; - class TargetData; - + class DataLayout; + /// X86COFFMachineModuleInfo - This is a MachineModuleInfoImpl implementation /// for X86 COFF targets. class X86COFFMachineModuleInfo : public MachineModuleInfoImpl { - StringSet<> CygMingStubs; - - // We have to propagate some information about MachineFunction to - // AsmPrinter. It's ok, when we're printing the function, since we have - // access to MachineFunction and can get the appropriate MachineFunctionInfo. - // Unfortunately, this is not possible when we're printing reference to - // Function (e.g. calling it and so on). Even more, there is no way to get the - // corresponding MachineFunctions: it can even be not created at all. That's - // why we should use additional structure, when we're collecting all necessary - // information. - // - // This structure is using e.g. for name decoration for stdcall & fastcall'ed - // function, since we have to use arguments' size for decoration. - typedef std::map FMFInfoMap; - FMFInfoMap FunctionInfoMap; - + DenseSet Externals; public: - X86COFFMachineModuleInfo(const MachineModuleInfo &); - ~X86COFFMachineModuleInfo(); - - - void DecorateCygMingName(std::string &Name, const GlobalValue *GV, - const TargetData &TD); - void DecorateCygMingName(SmallVectorImpl &Name, const GlobalValue *GV, - const TargetData &TD); - - void AddFunctionInfo(const Function *F, const X86MachineFunctionInfo &Val); - + X86COFFMachineModuleInfo(const MachineModuleInfo &) {} + virtual ~X86COFFMachineModuleInfo(); - typedef StringSet<>::const_iterator stub_iterator; - stub_iterator stub_begin() const { return CygMingStubs.begin(); } - stub_iterator stub_end() const { return CygMingStubs.end(); } + void addExternalFunction(MCSymbol* Symbol) { + Externals.insert(Symbol); + } - + typedef DenseSet::const_iterator externals_iterator; + externals_iterator externals_begin() const { return Externals.begin(); } + externals_iterator externals_end() const { return Externals.end(); } };