diff options
author | Douglas Gregor <dgregor@apple.com> | 2008-11-17 14:58:09 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2008-11-17 14:58:09 +0000 |
commit | 77324f385482d592ef54b286ffbb00f47b9259ac (patch) | |
tree | 7c60f2f71c6e87fbc3242d87e24cf4b23cd9d435 /clang/lib/CodeGen/CGDebugInfo.cpp | |
parent | d1f5e5d30458080f3591251d29bd6758f667a448 (diff) | |
download | bcm5719-llvm-77324f385482d592ef54b286ffbb00f47b9259ac.tar.gz bcm5719-llvm-77324f385482d592ef54b286ffbb00f47b9259ac.zip |
Introduction the DeclarationName class, as a single, general method of
representing the names of declarations in the C family of
languages. DeclarationName is used in NamedDecl to store the name of
the declaration (naturally), and ObjCMethodDecl is now a NamedDecl.
llvm-svn: 59441
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 9a04a83d6e6..55ce237e14f 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -152,7 +152,7 @@ llvm::DIType CGDebugInfo::CreateType(const TypedefType *Ty, // We don't set size information, but do specify where the typedef was // declared. - const char *TyName = Ty->getDecl()->getName(); + const char *TyName = Ty->getDecl()->getIdentifierName(); SourceLocation DefLoc = Ty->getDecl()->getLocation(); llvm::DICompileUnit DefUnit = getOrCreateCompileUnit(DefLoc); @@ -206,7 +206,7 @@ llvm::DIType CGDebugInfo::CreateType(const RecordType *Ty, SourceManager &SM = M->getContext().getSourceManager(); // Get overall information about the record type for the debug info. - const char *Name = Decl->getName(); + const char *Name = Decl->getIdentifierName(); if (Name == 0) Name = ""; llvm::DICompileUnit DefUnit = getOrCreateCompileUnit(Decl->getLocation()); @@ -242,7 +242,7 @@ llvm::DIType CGDebugInfo::CreateType(const RecordType *Ty, FieldDecl *Field = *I; llvm::DIType FieldTy = getOrCreateType(Field->getType(), Unit); - const char *FieldName = Field->getName(); + const char *FieldName = Field->getIdentifierName(); if (FieldName == 0) FieldName = ""; // Get the location for the field. @@ -301,7 +301,8 @@ llvm::DIType CGDebugInfo::CreateType(const EnumType *Ty, llvm::DIArray EltArray = DebugFactory.GetOrCreateArray(&Enumerators[0], Enumerators.size()); - const char *EnumName = Decl->getName() ? Decl->getName() : ""; + const char *EnumName + = Decl->getIdentifierName() ? Decl->getIdentifierName() : ""; SourceLocation DefLoc = Decl->getLocation(); llvm::DICompileUnit DefUnit = getOrCreateCompileUnit(DefLoc); SourceManager &SM = M->getContext().getSourceManager(); @@ -515,7 +516,7 @@ void CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable *Var, llvm::DICompileUnit Unit = getOrCreateCompileUnit(Decl->getLocation()); SourceManager &SM = M->getContext().getSourceManager(); uint64_t LineNo = SM.getLogicalLineNumber(Decl->getLocation()); - const char *Name = Decl->getName(); + const char *Name = Decl->getIdentifierName(); DebugFactory.CreateGlobalVariable(Unit, Name, Name, "", Unit, LineNo, getOrCreateType(Decl->getType(), Unit), |