[llvm-commits] [llvm] r61711 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp

Devang Patel dpatel at apple.com
Mon Jan 5 09:46:00 PST 2009


Author: dpatel
Date: Mon Jan  5 11:45:59 2009
New Revision: 61711

URL: http://llvm.org/viewvc/llvm-project?rev=61711&view=rev
Log:
subsume ConstructPointerType()

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp?rev=61711&r1=61710&r2=61711&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Mon Jan  5 11:45:59 2009
@@ -1449,17 +1449,11 @@
   /// 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.





More information about the llvm-commits mailing list