From 8ec03f58c33c33a917f54bb7f2cd61b6d7ffe0ca Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 24 Nov 2008 03:54:41 +0000 Subject: Rename NamedDecl::getIdentifierName() to ::getNameAsCString() and make it assert if the name is not an identifier. Update callers to do the right thing and avoid this method in unsafe cases. This also fixes an objc warning that was missing a space, and migrates a couple more to taking IdentifierInfo and QualTypes instead of std::strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59936 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenFunction.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/CodeGen/CodeGenFunction.cpp') diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index b56b050c14..534adfe5bb 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -121,7 +121,8 @@ void CodeGenFunction::StartFunction(const Decl *D, QualType RetTy, if (CGDebugInfo *DI = CGM.getDebugInfo()) { DI->setLocation(StartLoc); if (const FunctionDecl *FD = dyn_cast(D)) { - DI->EmitFunctionStart(FD->getIdentifierName(), RetTy, CurFn, Builder); + DI->EmitFunctionStart(FD->getIdentifier()->getName(), + RetTy, CurFn, Builder); } else { // Just use LLVM function name. DI->EmitFunctionStart(Fn->getName().c_str(), -- cgit v1.2.3-18-g5258