summaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86COFFMachineModuleInfo.h
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2010-02-12 15:28:40 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2010-02-12 15:28:40 +0000
commit4dd162f3945636cbe6123682619e994f75a62d00 (patch)
tree13febe0c2b4d5b33cbcdcfa59620cb7619c66a6d /lib/Target/X86/X86COFFMachineModuleInfo.h
parentf21a2f15aa967f16c2b8c71da3009c583890a059 (diff)
downloadllvm-4dd162f3945636cbe6123682619e994f75a62d00.tar.gz
llvm-4dd162f3945636cbe6123682619e994f75a62d00.tar.bz2
llvm-4dd162f3945636cbe6123682619e994f75a62d00.tar.xz
Cleanup stdcall / fastcall name mangling.
This should fix alot of problems we saw so far, e.g. PRs 5851 & 2936 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95980 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86COFFMachineModuleInfo.h')
-rw-r--r--lib/Target/X86/X86COFFMachineModuleInfo.h27
1 files changed, 4 insertions, 23 deletions
diff --git a/lib/Target/X86/X86COFFMachineModuleInfo.h b/lib/Target/X86/X86COFFMachineModuleInfo.h
index 0e2009e003..9de3dcd634 100644
--- a/lib/Target/X86/X86COFFMachineModuleInfo.h
+++ b/lib/Target/X86/X86COFFMachineModuleInfo.h
@@ -21,44 +21,25 @@
namespace llvm {
class X86MachineFunctionInfo;
class TargetData;
-
+
/// 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<const Function*, X86MachineFunctionInfo> FMFInfoMap;
- FMFInfoMap FunctionInfoMap;
-
+ DenseMap<const Function*, unsigned> FnArgWords;
public:
X86COFFMachineModuleInfo(const MachineModuleInfo &);
~X86COFFMachineModuleInfo();
-
-
+
void DecorateCygMingName(MCSymbol* &Name, MCContext &Ctx,
const GlobalValue *GV, const TargetData &TD);
void DecorateCygMingName(SmallVectorImpl<char> &Name, const GlobalValue *GV,
const TargetData &TD);
-
- void AddFunctionInfo(const Function *F, const X86MachineFunctionInfo &Val);
-
+ void addExternalFunction(const StringRef& Name);
typedef StringSet<>::const_iterator stub_iterator;
stub_iterator stub_begin() const { return CygMingStubs.begin(); }
stub_iterator stub_end() const { return CygMingStubs.end(); }
-
-
};