From 5f2bfd4811996abb783aa6c7254c56baa6930e8c Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Fri, 13 Feb 2009 00:10:09 +0000 Subject: Add basic support for C++ name mangling according to the Itanium C++ ABI to the CodeGen library. Since C++ code-generation is so incomplete, we can't exercise much of this mangling code. However, a few smoke tests show that it's doing the same thing as GCC. When C++ codegen matures, we'll extend the ABI tester to verify name-mangling as well, and complete the implementation here. At this point, the major client of name mangling is in the uses of the new "overloadable" attribute in C, which allows overloading. Any "overloadable" function in C (or in an extern "C" block in C++) will be mangled the same way that the corresponding C++ function would be mangled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64413 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExpr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/CodeGen/CGExpr.cpp') diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 7ef6fdf2af..83fbd72f90 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -714,7 +714,7 @@ LValue CodeGenFunction::EmitPredefinedFunctionName(unsigned Type) { std::string FunctionName; if(const FunctionDecl *FD = dyn_cast(CurFuncDecl)) { - FunctionName = FD->getNameAsString(); + FunctionName = CGM.getMangledName(FD)->getName(); } else { // Just get the mangled name. FunctionName = CurFn->getName(); -- cgit v1.2.3