diff options
author | Devang Patel <dpatel@apple.com> | 2009-09-29 18:40:58 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-09-29 18:40:58 +0000 |
commit | 5ccdd10b1a0ee1ce35b6e5a18eb0fcfd6f5131d3 (patch) | |
tree | a8b8f8f8ef75c6473e5b19d7f4f8b955af86052a /lib/Target/PIC16/PIC16DebugInfo.cpp | |
parent | 1e9a727f1058c9e8f90eae9ac656214265244f7f (diff) |
Remove std::string uses from DebugInfo interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83083 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PIC16/PIC16DebugInfo.cpp')
-rw-r--r-- | lib/Target/PIC16/PIC16DebugInfo.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/Target/PIC16/PIC16DebugInfo.cpp b/lib/Target/PIC16/PIC16DebugInfo.cpp index 3499e5c356..c32b659a3f 100644 --- a/lib/Target/PIC16/PIC16DebugInfo.cpp +++ b/lib/Target/PIC16/PIC16DebugInfo.cpp @@ -44,8 +44,7 @@ void PIC16DbgInfo::PopulateDebugInfo (DIType Ty, unsigned short &TypeNo, /// PopulateBasicTypeInfo- Populate TypeNo for basic type from Ty. /// void PIC16DbgInfo::PopulateBasicTypeInfo (DIType Ty, unsigned short &TypeNo) { - std::string Name = ""; - Ty.getName(Name); + std::string Name = Ty.getName(); unsigned short BaseTy = GetTypeDebugNumber(Name); TypeNo = TypeNo << PIC16Dbg::S_BASIC; TypeNo = TypeNo | (0xffff & BaseTy); @@ -117,7 +116,7 @@ void PIC16DbgInfo::PopulateStructOrUnionTypeInfo (DIType Ty, TypeNo = TypeNo | PIC16Dbg::T_STRUCT; else TypeNo = TypeNo | PIC16Dbg::T_UNION; - CTy.getName(TagName); + TagName = CTy.getName(); // UniqueSuffix is .number where number is obtained from // llvm.dbg.composite<number>. // FIXME: This will break when composite type is not represented by @@ -305,9 +304,8 @@ void PIC16DbgInfo::EmitCompositeTypeElements (DICompositeType CTy, bool HasAux = false; int ElementAux[PIC16Dbg::AuxSize] = { 0 }; std::string TagName = ""; - std::string ElementName; DIDerivedType DITy(Element.getNode()); - DITy.getName(ElementName); + const char *ElementName = DITy.getName(); unsigned short ElementSize = DITy.getSizeInBits()/8; // Get mangleddd name for this structure/union element. std::string MangMemName = ElementName + SuffixNo; @@ -338,8 +336,7 @@ void PIC16DbgInfo::EmitCompositeTypeDecls(Module &M) { continue; if (CTy.getTag() == dwarf::DW_TAG_union_type || CTy.getTag() == dwarf::DW_TAG_structure_type ) { - std::string Name; - CTy.getName(Name); + const char *Name = CTy.getName(); // Get the number after llvm.dbg.composite and make UniqueSuffix from // it. std::string DIVar = CTy.getNode()->getNameStr(); @@ -468,9 +465,9 @@ void PIC16DbgInfo::EmitVarDebugInfo(Module &M) { void PIC16DbgInfo::SwitchToCU(MDNode *CU) { // Get the file path from CU. DICompileUnit cu(CU); - std::string DirName, FileName; - std::string FilePath = cu.getDirectory(DirName) + "/" + - cu.getFilename(FileName); + std::string DirName = cu.getDirectory(); + std::string FileName = cu.getFilename(); + std::string FilePath = DirName + "/" + FileName; // Nothing to do if source file is still same. if ( FilePath == CurFile ) return; |