[cfe-commits] r77147 - in /cfe/trunk/lib/CodeGen: CGDecl.cpp CGExprComplex.cpp

Daniel Dunbar daniel at zuster.org
Sun Jul 26 01:32:49 PDT 2009


Author: ddunbar
Date: Sun Jul 26 03:32:30 2009
New Revision: 77147

URL: http://llvm.org/viewvc/llvm-project?rev=77147&view=rev
Log:
Switch to using llvm::Value::getName()

Modified:
    cfe/trunk/lib/CodeGen/CGDecl.cpp
    cfe/trunk/lib/CodeGen/CGExprComplex.cpp

Modified: cfe/trunk/lib/CodeGen/CGDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDecl.cpp?rev=77147&r1=77146&r2=77147&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGDecl.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDecl.cpp Sun Jul 26 03:32:30 2009
@@ -95,8 +95,7 @@
     if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(CurFuncDecl))
       ContextName = CGM.getMangledName(FD);
     else if (isa<ObjCMethodDecl>(CurFuncDecl))
-      ContextName = std::string(CurFn->getNameStart(), 
-                                CurFn->getNameStart() + CurFn->getNameLen());
+      ContextName = CurFn->getName();
     else
       assert(0 && "Unknown context for block var decl");
     

Modified: cfe/trunk/lib/CodeGen/CGExprComplex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprComplex.cpp?rev=77147&r1=77146&r2=77147&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprComplex.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprComplex.cpp Sun Jul 26 03:32:30 2009
@@ -261,8 +261,8 @@
 /// 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;
 





More information about the cfe-commits mailing list