mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-05 12:31:33 +00:00
prune #includes, realize the MMI can never be null.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100407 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
493c9765e0
commit
74e41f9821
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
#define DEBUG_TYPE "dwarfdebug"
|
#define DEBUG_TYPE "dwarfdebug"
|
||||||
#include "DwarfDebug.h"
|
#include "DwarfDebug.h"
|
||||||
|
#include "DIE.h"
|
||||||
#include "llvm/Module.h"
|
#include "llvm/Module.h"
|
||||||
#include "llvm/CodeGen/MachineFunction.h"
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
#include "llvm/CodeGen/MachineModuleInfo.h"
|
#include "llvm/CodeGen/MachineModuleInfo.h"
|
||||||
@ -26,6 +27,7 @@
|
|||||||
#include "llvm/Target/TargetLoweringObjectFile.h"
|
#include "llvm/Target/TargetLoweringObjectFile.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
#include "llvm/Target/TargetRegisterInfo.h"
|
#include "llvm/Target/TargetRegisterInfo.h"
|
||||||
|
#include "llvm/Analysis/DebugInfo.h"
|
||||||
#include "llvm/ADT/STLExtras.h"
|
#include "llvm/ADT/STLExtras.h"
|
||||||
#include "llvm/ADT/StringExtras.h"
|
#include "llvm/ADT/StringExtras.h"
|
||||||
#include "llvm/Support/Debug.h"
|
#include "llvm/Support/Debug.h"
|
||||||
@ -401,6 +403,14 @@ void DwarfDebug::addDelta(DIE *Die, unsigned Attribute, unsigned Form,
|
|||||||
Die->addValue(Attribute, Form, Value);
|
Die->addValue(Attribute, Form, Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// addDIEEntry - Add a DIE attribute data and value.
|
||||||
|
///
|
||||||
|
void DwarfDebug::addDIEEntry(DIE *Die, unsigned Attribute, unsigned Form,
|
||||||
|
DIE *Entry) {
|
||||||
|
Die->addValue(Attribute, Form, createDIEEntry(Entry));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// addBlock - Add block data.
|
/// addBlock - Add block data.
|
||||||
///
|
///
|
||||||
void DwarfDebug::addBlock(DIE *Die, unsigned Attribute, unsigned Form,
|
void DwarfDebug::addBlock(DIE *Die, unsigned Attribute, unsigned Form,
|
||||||
@ -1793,8 +1803,6 @@ void DwarfDebug::constructSubprogramDIE(MDNode *N) {
|
|||||||
/// content. Create global DIEs and emit initial debug info sections.
|
/// content. Create global DIEs and emit initial debug info sections.
|
||||||
/// This is inovked by the target AsmPrinter.
|
/// This is inovked by the target AsmPrinter.
|
||||||
void DwarfDebug::beginModule(Module *M) {
|
void DwarfDebug::beginModule(Module *M) {
|
||||||
MMI = Asm->MMI;
|
|
||||||
|
|
||||||
TimeRegion Timer(DebugTimer);
|
TimeRegion Timer(DebugTimer);
|
||||||
|
|
||||||
DebugInfoFinder DbgFinder;
|
DebugInfoFinder DbgFinder;
|
||||||
@ -1994,8 +2002,6 @@ DbgVariable *DwarfDebug::findAbstractVariable(DIVariable &Var,
|
|||||||
|
|
||||||
/// collectVariableInfo - Populate DbgScope entries with variables' info.
|
/// collectVariableInfo - Populate DbgScope entries with variables' info.
|
||||||
void DwarfDebug::collectVariableInfo() {
|
void DwarfDebug::collectVariableInfo() {
|
||||||
if (!MMI) return;
|
|
||||||
|
|
||||||
const LLVMContext &Ctx = Asm->MF->getFunction()->getContext();
|
const LLVMContext &Ctx = Asm->MF->getFunction()->getContext();
|
||||||
|
|
||||||
MachineModuleInfo::VariableDbgInfoMapTy &VMap = MMI->getVariableDbgInfo();
|
MachineModuleInfo::VariableDbgInfoMapTy &VMap = MMI->getVariableDbgInfo();
|
||||||
@ -2297,8 +2303,8 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) {
|
|||||||
/// endFunction - Gather and emit post-function debug information.
|
/// endFunction - Gather and emit post-function debug information.
|
||||||
///
|
///
|
||||||
void DwarfDebug::endFunction(const MachineFunction *MF) {
|
void DwarfDebug::endFunction(const MachineFunction *MF) {
|
||||||
if (!MMI->hasDebugInfo()) return;
|
if (!MMI->hasDebugInfo() ||
|
||||||
if (DbgScopeMap.empty()) return;
|
DbgScopeMap.empty()) return;
|
||||||
|
|
||||||
TimeRegion Timer(DebugTimer);
|
TimeRegion Timer(DebugTimer);
|
||||||
|
|
||||||
@ -2346,9 +2352,6 @@ void DwarfDebug::endFunction(const MachineFunction *MF) {
|
|||||||
/// unique label that was emitted and which provides correspondence to
|
/// unique label that was emitted and which provides correspondence to
|
||||||
/// the source line list.
|
/// the source line list.
|
||||||
MCSymbol *DwarfDebug::recordSourceLine(unsigned Line, unsigned Col, MDNode *S) {
|
MCSymbol *DwarfDebug::recordSourceLine(unsigned Line, unsigned Col, MDNode *S) {
|
||||||
if (!MMI)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
TimeRegion Timer(DebugTimer);
|
TimeRegion Timer(DebugTimer);
|
||||||
|
|
||||||
StringRef Dir;
|
StringRef Dir;
|
||||||
|
@ -14,18 +14,13 @@
|
|||||||
#ifndef CODEGEN_ASMPRINTER_DWARFDEBUG_H__
|
#ifndef CODEGEN_ASMPRINTER_DWARFDEBUG_H__
|
||||||
#define CODEGEN_ASMPRINTER_DWARFDEBUG_H__
|
#define CODEGEN_ASMPRINTER_DWARFDEBUG_H__
|
||||||
|
|
||||||
#include "DIE.h"
|
|
||||||
#include "llvm/CodeGen/AsmPrinter.h"
|
#include "llvm/CodeGen/AsmPrinter.h"
|
||||||
#include "llvm/CodeGen/MachineLocation.h"
|
|
||||||
#include "llvm/Analysis/DebugInfo.h"
|
|
||||||
#include "llvm/Support/Allocator.h"
|
|
||||||
#include "llvm/Support/raw_ostream.h"
|
|
||||||
#include "llvm/ADT/DenseMap.h"
|
#include "llvm/ADT/DenseMap.h"
|
||||||
#include "llvm/ADT/FoldingSet.h"
|
#include "llvm/ADT/FoldingSet.h"
|
||||||
#include "llvm/ADT/SmallSet.h"
|
#include "llvm/ADT/SmallPtrSet.h"
|
||||||
#include "llvm/ADT/StringMap.h"
|
#include "llvm/ADT/StringMap.h"
|
||||||
#include "llvm/ADT/UniqueVector.h"
|
#include "llvm/ADT/UniqueVector.h"
|
||||||
#include <string>
|
#include "llvm/Support/Allocator.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
@ -34,9 +29,27 @@ class DbgConcreteScope;
|
|||||||
class DbgScope;
|
class DbgScope;
|
||||||
class DbgVariable;
|
class DbgVariable;
|
||||||
class MachineFrameInfo;
|
class MachineFrameInfo;
|
||||||
|
class MachineLocation;
|
||||||
class MachineModuleInfo;
|
class MachineModuleInfo;
|
||||||
class MCAsmInfo;
|
class MCAsmInfo;
|
||||||
class Timer;
|
class Timer;
|
||||||
|
class DIEAbbrev;
|
||||||
|
class DIE;
|
||||||
|
class DIEBlock;
|
||||||
|
class DIEEntry;
|
||||||
|
|
||||||
|
class DIEnumerator;
|
||||||
|
class DIDescriptor;
|
||||||
|
class DIVariable;
|
||||||
|
class DIGlobal;
|
||||||
|
class DIGlobalVariable;
|
||||||
|
class DISubprogram;
|
||||||
|
class DIBasicType;
|
||||||
|
class DIDerivedType;
|
||||||
|
class DIType;
|
||||||
|
class DINameSpace;
|
||||||
|
class DISubrange;
|
||||||
|
class DICompositeType;
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
/// SrcLineInfo - This class is used to record source line correspondence.
|
/// SrcLineInfo - This class is used to record source line correspondence.
|
||||||
@ -279,10 +292,8 @@ private:
|
|||||||
|
|
||||||
/// addDIEEntry - Add a DIE attribute data and value.
|
/// addDIEEntry - Add a DIE attribute data and value.
|
||||||
///
|
///
|
||||||
void addDIEEntry(DIE *Die, unsigned Attribute, unsigned Form, DIE *Entry) {
|
void addDIEEntry(DIE *Die, unsigned Attribute, unsigned Form, DIE *Entry);
|
||||||
Die->addValue(Attribute, Form, createDIEEntry(Entry));
|
|
||||||
}
|
|
||||||
|
|
||||||
/// addBlock - Add block data.
|
/// addBlock - Add block data.
|
||||||
///
|
///
|
||||||
void addBlock(DIE *Die, unsigned Attribute, unsigned Form, DIEBlock *Block);
|
void addBlock(DIE *Die, unsigned Attribute, unsigned Form, DIEBlock *Block);
|
||||||
|
Loading…
Reference in New Issue
Block a user