From: Daniel Dunbar Date: Thu, 23 Jul 2009 05:30:36 +0000 (+0000) Subject: Shield clang from LLVM API changes, until the dust settles. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=42719fc8145cb0da244b1826551e6b441db89209;p=clang Shield clang from LLVM API changes, until the dust settles. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76862 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index 962f8a0950..80cfeff7f3 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -177,7 +177,9 @@ void CodeGenFunction::StartFunction(const Decl *D, QualType RetTy, DI->EmitFunctionStart(CGM.getMangledName(FD), RetTy, CurFn, Builder); } else { // Just use LLVM function name. - DI->EmitFunctionStart(Fn->getName().c_str(), + + // FIXME: Remove unnecessary conversion to std::string when API settles. + DI->EmitFunctionStart(std::string(Fn->getName()).c_str(), RetTy, CurFn, Builder); } }