aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenTypes.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-11-24 05:29:24 +0000
committerChris Lattner <sabre@nondot.org>2008-11-24 05:29:24 +0000
commitd9d22dd9c94618490dbffb0e2caf222530ca39d3 (patch)
treeb93ae748c2c5dc85678512aa3c958323b717ae26 /lib/CodeGen/CodeGenTypes.cpp
parente8a32b855ce4e8580a191f8d29d2f3f459834302 (diff)
Rename NamedDecl::getName() to getNameAsString(). Replace a bunch of
uses of getName() with uses of getDeclName(). This upgrades a bunch of diags to take DeclNames instead of std::strings. This also tweaks a couple of diagnostics to be cleaner and changes CheckInitializerTypes/PerformInitializationByConstructor to pass around DeclarationNames instead of std::strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59947 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenTypes.cpp')
-rw-r--r--lib/CodeGen/CodeGenTypes.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/CodeGenTypes.cpp b/lib/CodeGen/CodeGenTypes.cpp
index e49281dd68..18cfdeaff6 100644
--- a/lib/CodeGen/CodeGenTypes.cpp
+++ b/lib/CodeGen/CodeGenTypes.cpp
@@ -291,7 +291,7 @@ const llvm::Type *CodeGenTypes::ConvertNewType(QualType T) {
std::vector<const llvm::Type*> IvarTypes;
CollectObjCIvarTypes(OIT.getDecl(), IvarTypes);
llvm::Type *T = llvm::StructType::get(IvarTypes);
- TheModule.addTypeName(std::string("struct.") + OIT.getDecl()->getName(), T);
+ TheModule.addTypeName("struct." + OIT.getDecl()->getNameAsString(), T);
return T;
}
@@ -315,9 +315,9 @@ const llvm::Type *CodeGenTypes::ConvertNewType(QualType T) {
// Name the codegen type after the typedef name
// if there is no tag type name available
if (TD->getIdentifier())
- TypeName += TD->getName();
+ TypeName += TD->getNameAsString();
else if (const TypedefType *TdT = dyn_cast<TypedefType>(T))
- TypeName += TdT->getDecl()->getName();
+ TypeName += TdT->getDecl()->getNameAsString();
else
TypeName += "anon";