aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDecl.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-11-24 04:00:27 +0000
committerChris Lattner <sabre@nondot.org>2008-11-24 04:00:27 +0000
commit39f34e97d6a468f0a7dfa5664c61217cffc65b74 (patch)
tree9681872a04f2582824f6038b5df91cea35bb4742 /lib/CodeGen/CGDecl.cpp
parent8ec03f58c33c33a917f54bb7f2cd61b6d7ffe0ca (diff)
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
Diffstat (limited to 'lib/CodeGen/CGDecl.cpp')
-rw-r--r--lib/CodeGen/CGDecl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp
index 77ef57750e..9352c35a81 100644
--- a/lib/CodeGen/CGDecl.cpp
+++ b/lib/CodeGen/CGDecl.cpp
@@ -91,7 +91,7 @@ CodeGenFunction::GenerateStaticBlockVarDecl(const VarDecl &D,
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 @@ CodeGenFunction::GenerateStaticBlockVarDecl(const VarDecl &D,
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 @@ void CodeGenFunction::EmitParmDecl(const VarDecl &D, llvm::Value *Arg) {
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 @@ void CodeGenFunction::EmitParmDecl(const VarDecl &D, llvm::Value *Arg) {
// 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];