mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Remove std::string uses from DebugInfo interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83083 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user