From: Daniel Dunbar Date: Sun, 26 Jul 2009 08:32:30 +0000 (+0000) Subject: Switch to using llvm::Value::getName() X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0d9c54cc6255696937905d7f3a7a6c5eca7d4fde;p=clang Switch to using llvm::Value::getName() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77147 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp index aec7fadcdb..b8269eb30f 100644 --- a/lib/CodeGen/CGDecl.cpp +++ b/lib/CodeGen/CGDecl.cpp @@ -95,8 +95,7 @@ CodeGenFunction::CreateStaticBlockVarDecl(const VarDecl &D, if (const FunctionDecl *FD = dyn_cast(CurFuncDecl)) ContextName = CGM.getMangledName(FD); else if (isa(CurFuncDecl)) - ContextName = std::string(CurFn->getNameStart(), - CurFn->getNameStart() + CurFn->getNameLen()); + ContextName = CurFn->getName(); else assert(0 && "Unknown context for block var decl"); diff --git a/lib/CodeGen/CGExprComplex.cpp b/lib/CodeGen/CGExprComplex.cpp index a89ef9e80e..445efe8864 100644 --- a/lib/CodeGen/CGExprComplex.cpp +++ b/lib/CodeGen/CGExprComplex.cpp @@ -261,8 +261,8 @@ public: /// load the real and imaginary pieces, returning them as Real/Imag. ComplexPairTy ComplexExprEmitter::EmitLoadOfComplex(llvm::Value *SrcPtr, bool isVolatile) { - llvm::SmallString<64> Name(SrcPtr->getNameStart(), - SrcPtr->getNameStart()+SrcPtr->getNameLen()); + llvm::SmallString<64> Name(SrcPtr->getName().begin(), + SrcPtr->getName().end()); llvm::Value *Real=0, *Imag=0;