Migrate some stuff from NamedDecl::getName() to
NamedDecl::getNameAsString() to make it more explicit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59937 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp
index 77ef577..9352c35 100644
--- a/lib/CodeGen/CGDecl.cpp
+++ b/lib/CodeGen/CGDecl.cpp
@@ -91,7 +91,7 @@
std::string ContextName;
if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(CurFuncDecl))
- ContextName = FD->getName();
+ ContextName = FD->getNameAsString();
else if (isa<ObjCMethodDecl>(CurFuncDecl))
ContextName = std::string(CurFn->getNameStart(),
CurFn->getNameStart() + CurFn->getNameLen());
@@ -101,7 +101,7 @@
llvm::GlobalValue *GV =
new llvm::GlobalVariable(Init->getType(), false,
llvm::GlobalValue::InternalLinkage,
- Init, ContextName + Separator + D.getName(),
+ Init, ContextName + Separator +D.getNameAsString(),
&CGM.getModule(), 0, Ty.getAddressSpace());
return GV;
@@ -212,7 +212,7 @@
const llvm::Type *LTy = ConvertType(Ty);
if (LTy->isSingleValueType()) {
// TODO: Alignment
- std::string Name(D.getName());
+ std::string Name = D.getNameAsString();
Name += ".addr";
DeclPtr = CreateTempAlloca(LTy, Name.c_str());
@@ -222,7 +222,7 @@
// Otherwise, if this is an aggregate, just use the input pointer.
DeclPtr = Arg;
}
- Arg->setName(D.getName());
+ Arg->setName(D.getNameAsString());
}
llvm::Value *&DMEntry = LocalDeclMap[&D];