[llvm-commits] [llvm] r100406 - in /llvm/trunk: include/llvm/CodeGen/DwarfWriter.h lib/CodeGen/AsmPrinter/CMakeLists.txt lib/CodeGen/AsmPrinter/DwarfWriter.cpp

Chris Lattner sabre at nondot.org
Sun Apr 4 22:12:59 PDT 2010


Author: lattner
Date: Mon Apr  5 00:12:59 2010
New Revision: 100406

URL: http://llvm.org/viewvc/llvm-project?rev=100406&view=rev
Log:
finally blast DwarfWriter away.

Removed:
    llvm/trunk/include/llvm/CodeGen/DwarfWriter.h
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/CMakeLists.txt

Removed: llvm/trunk/include/llvm/CodeGen/DwarfWriter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/DwarfWriter.h?rev=100405&view=auto
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/DwarfWriter.h (original)
+++ llvm/trunk/include/llvm/CodeGen/DwarfWriter.h (removed)
@@ -1,95 +0,0 @@
-//===-- llvm/CodeGen/DwarfWriter.h - Dwarf Framework ------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file contains support for writing Dwarf debug and exception info into
-// asm files.  For Details on the Dwarf 3 specfication see DWARF Debugging
-// Information Format V.3 reference manual http://dwarf.freestandards.org ,
-//
-// The role of the Dwarf Writer class is to extract information from the
-// MachineModuleInfo object, organize it in Dwarf form and then emit it into asm
-// the current asm file using data and high level Dwarf directives.
-// 
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CODEGEN_DWARFWRITER_H
-#define LLVM_CODEGEN_DWARFWRITER_H
-
-#include "llvm/Pass.h"
-#include "llvm/Target/TargetMachine.h"
-
-namespace llvm {
-
-class AsmPrinter;
-class DwarfDebug;
-class DwarfException;
-class MachineModuleInfo;
-class MachineFunction;
-class MachineInstr;
-class Value;
-class Module;
-class MDNode;
-class MCAsmInfo;
-class MCSymbol;
-class raw_ostream;
-class Instruction;
-class DICompileUnit;
-class DISubprogram;
-class DIVariable;
-
-//===----------------------------------------------------------------------===//
-// DwarfWriter - Emits Dwarf debug and exception handling directives.
-//
-
-class DwarfWriter : public ImmutablePass {
-private:
-  /// DD - Provides the DwarfWriter debug implementation.
-  ///
-  DwarfDebug *DD;
-
-  /// DE - Provides the DwarfWriter exception implementation.
-  ///
-  DwarfException *DE;
-
-public:
-  static char ID; // Pass identification, replacement for typeid
-
-  DwarfWriter();
-  virtual ~DwarfWriter();
-
-  //===--------------------------------------------------------------------===//
-  // Main entry points.
-  //
-  
-  /// BeginModule - Emit all Dwarf sections that should come prior to the
-  /// content.
-  void BeginModule(Module *M, AsmPrinter *A);
-  
-  /// EndModule - Emit all Dwarf sections that should come after the content.
-  ///
-  void EndModule();
-  
-  /// BeginFunction - Gather pre-function debug information.  Assumes being 
-  /// emitted immediately after the function entry point.
-  void BeginFunction(const MachineFunction *MF);
-  
-  /// EndFunction - Gather and emit post-function debug information.
-  ///
-  void EndFunction(const MachineFunction *MF);
-
-  /// ShouldEmitDwarfDebug - Returns true if Dwarf debugging declarations should
-  /// be emitted.
-  bool ShouldEmitDwarfDebug() const;
-
-  void BeginScope(const MachineInstr *MI);
-  void EndScope(const MachineInstr *MI);
-};
-
-} // end llvm namespace
-
-#endif

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/CMakeLists.txt?rev=100406&r1=100405&r2=100406&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/CMakeLists.txt (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/CMakeLists.txt Mon Apr  5 00:12:59 2010
@@ -5,6 +5,5 @@
   DIE.cpp
   DwarfDebug.cpp
   DwarfException.cpp
-  DwarfWriter.cpp
   OcamlGCPrinter.cpp
   )

Removed: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp?rev=100405&view=auto
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (removed)
@@ -1,82 +0,0 @@
-//===-- llvm/CodeGen/DwarfWriter.cpp - Dwarf Framework --------------------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file contains support for writing dwarf info into asm files.
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/CodeGen/DwarfWriter.h"
-#include "DwarfDebug.h"
-#include "DwarfException.h"
-#include "llvm/CodeGen/MachineModuleInfo.h"
-
-using namespace llvm;
-
-static RegisterPass<DwarfWriter>
-X("dwarfwriter", "DWARF Information Writer");
-char DwarfWriter::ID = 0;
-
-//===----------------------------------------------------------------------===//
-/// DwarfWriter Implementation
-///
-
-DwarfWriter::DwarfWriter()
-  : ImmutablePass(&ID), DD(0), DE(0) {}
-
-DwarfWriter::~DwarfWriter() {
-  delete DE;
-  delete DD;
-}
-
-/// BeginModule - Emit all Dwarf sections that should come prior to the
-/// content.
-void DwarfWriter::BeginModule(Module *M, AsmPrinter *A) {
-  DE = new DwarfException(A);
-  DD = new DwarfDebug(A, M);
-}
-
-/// EndModule - Emit all Dwarf sections that should come after the content.
-///
-void DwarfWriter::EndModule() {
-  DE->EndModule();
-  DD->endModule();
-  delete DD; DD = 0;
-  delete DE; DE = 0;
-}
-
-/// BeginFunction - Gather pre-function debug information.  Assumes being
-/// emitted immediately after the function entry point.
-void DwarfWriter::BeginFunction(const MachineFunction *MF) {
-  DE->BeginFunction(MF);
-  DD->beginFunction(MF);
-}
-
-/// EndFunction - Gather and emit post-function debug information.
-///
-void DwarfWriter::EndFunction(const MachineFunction *MF) {
-  DD->endFunction(MF);
-  DE->EndFunction();
-
-  if (MachineModuleInfo *MMI = DE->MMI)
-    // Clear function debug information.
-    MMI->EndFunction();
-}
-
-/// ShouldEmitDwarfDebug - Returns true if Dwarf debugging declarations should
-/// be emitted.
-bool DwarfWriter::ShouldEmitDwarfDebug() const {
-  return DD && DD->MMI->hasDebugInfo();
-}
-
-void DwarfWriter::BeginScope(const MachineInstr *MI) {
-  DD->beginScope(MI);
-}
-void DwarfWriter::EndScope(const MachineInstr *MI) {
-  DD->endScope(MI);
-}





More information about the llvm-commits mailing list