aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86/X86COFFMachineModuleInfo.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-12 21:03:47 +0000
committerChris Lattner <sabre@nondot.org>2010-03-12 21:03:47 +0000
commit0130c1db4c8bffcb4d49066d2685740c15d0f9a0 (patch)
tree460db886b543b78fc74f8381dcdc152f62c1fbb3 /lib/Target/X86/X86COFFMachineModuleInfo.cpp
parentb74bd876af035d0d726f0cab594c5e03d8300e4d (diff)
downloadexternal_llvm-0130c1db4c8bffcb4d49066d2685740c15d0f9a0.zip
external_llvm-0130c1db4c8bffcb4d49066d2685740c15d0f9a0.tar.gz
external_llvm-0130c1db4c8bffcb4d49066d2685740c15d0f9a0.tar.bz2
move fastcall/stdcall mangling up into Mangler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98384 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86COFFMachineModuleInfo.cpp')
-rw-r--r--lib/Target/X86/X86COFFMachineModuleInfo.cpp44
1 files changed, 0 insertions, 44 deletions
diff --git a/lib/Target/X86/X86COFFMachineModuleInfo.cpp b/lib/Target/X86/X86COFFMachineModuleInfo.cpp
index 2988e4f..e28c7ad 100644
--- a/lib/Target/X86/X86COFFMachineModuleInfo.cpp
+++ b/lib/Target/X86/X86COFFMachineModuleInfo.cpp
@@ -26,47 +26,3 @@ using namespace llvm;
X86COFFMachineModuleInfo::~X86COFFMachineModuleInfo() {
}
-/// DecorateCygMingName - Query FunctionInfoMap and use this information for
-/// various name decorations for Cygwin and MingW.
-MCSymbol *X86COFFMachineModuleInfo::DecorateCygMingName(MCSymbol *NameSym,
- MCContext &Ctx,
- const Function *F,
- const TargetData &TD) {
- // We don't want to decorate non-stdcall or non-fastcall functions right now
- CallingConv::ID CC = F->getCallingConv();
- if (CC != CallingConv::X86_StdCall && CC != CallingConv::X86_FastCall)
- return NameSym;
-
- unsigned ArgWords = 0;
-
- // Calculate arguments sizes
- for (Function::const_arg_iterator AI = F->arg_begin(), AE = F->arg_end();
- AI != AE; ++AI) {
- const Type *Ty = AI->getType();
-
- // 'Dereference' type in case of byval parameter attribute
- if (AI->hasByValAttr())
- Ty = cast<PointerType>(Ty)->getElementType();
-
- // Size should be aligned to DWORD boundary
- ArgWords += ((TD.getTypeAllocSize(Ty) + 3)/4)*4;
- }
-
- const FunctionType *FT = F->getFunctionType();
-
- SmallString<128> Name(NameSym->getName().begin(), NameSym->getName().end());
-
- // "Pure" variadic functions do not receive @0 suffix.
- if (!FT->isVarArg() || FT->getNumParams() == 0 ||
- (FT->getNumParams() == 1 && F->hasStructRetAttr()))
- raw_svector_ostream(Name) << '@' << ArgWords;
-
- if (CC == CallingConv::X86_FastCall) {
- if (Name[0] == '_')
- Name[0] = '@';
- else
- Name.insert(Name.begin(), '@');
- }
-
- return Ctx.GetOrCreateSymbol(Name.str());
-}