From ca03c2705ef6fc2df7c7206e1b5c0e6f69c12c04 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Mon, 5 Jan 2009 17:45:59 +0000 Subject: [PATCH] subsume ConstructPointerType() git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61711 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/DwarfWriter.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp index 3b21cebe444..13ea22cb289 100644 --- a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp @@ -1449,17 +1449,11 @@ private: /// AddPointerType - Add a new pointer type attribute to the specified entity. /// void AddPointerType(DIE *Entity, CompileUnit *Unit, const std::string &Name) { - DIE *Die = ConstructPointerType(Unit, Name); - AddDIEntry(Entity, DW_AT_type, DW_FORM_ref4, Die); - } - - /// ConstructPointerType - Construct a new pointer type. - /// - DIE *ConstructPointerType(CompileUnit *Unit, const std::string &Name) { DIE Buffer(DW_TAG_pointer_type); AddUInt(&Buffer, DW_AT_byte_size, 0, TD->getPointerSize()); if (!Name.empty()) AddString(&Buffer, DW_AT_name, DW_FORM_string, Name); - return Unit->AddDie(Buffer); + DIE *PointerTypeDie = Unit->AddDie(Buffer); + AddDIEntry(Entity, DW_AT_type, DW_FORM_ref4, PointerTypeDie); } /// AddType - Add a new type attribute to the specified entity.