Emit human readable names for c/c++ functions. Avoid emitting linkage name if it matches regular name.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93383 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp
index 3592c5c..f0a5c64 100644
--- a/lib/CodeGen/CodeGenFunction.cpp
+++ b/lib/CodeGen/CodeGenFunction.cpp
@@ -190,15 +190,9 @@
QualType FnType = getContext().getFunctionType(RetTy, 0, 0, false, 0);
// Emit subprogram debug descriptor.
- // FIXME: The cast here is a huge hack.
if (CGDebugInfo *DI = getDebugInfo()) {
DI->setLocation(StartLoc);
- if (isa<FunctionDecl>(D)) {
- DI->EmitFunctionStart(CGM.getMangledName(GD), FnType, CurFn, Builder);
- } else {
- // Just use LLVM function name.
- DI->EmitFunctionStart(Fn->getName(), FnType, CurFn, Builder);
- }
+ DI->EmitFunctionStart(GD, FnType, CurFn, Builder);
}
// FIXME: Leaked.