1 //===-- PIC16DebugInfo.h - Interfaces for PIC16 Debug Information ============//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains the helper functions for representing debug information.
12 //===----------------------------------------------------------------------===//
17 #include "llvm/Analysis/DebugInfo.h"
18 #include "llvm/Module.h"
19 #include "llvm/Target/TargetAsmInfo.h"
95 const TargetAsmInfo *TAI;
97 // EmitDebugDirectives is set if debug information is available. Default
98 // value for it is false.
99 bool EmitDebugDirectives;
100 unsigned FunctBeginLine;
102 PIC16DbgInfo(raw_ostream &o, const TargetAsmInfo *T) : O(o), TAI(T) {
104 EmitDebugDirectives = false;
106 void PopulateDebugInfo(DIType Ty, unsigned short &TypeNo, bool &HasAux,
107 int Aux[], std::string &TypeName);
108 unsigned GetTypeDebugNumber(std::string &type);
109 short getClass(DIGlobalVariable DIGV);
110 void EmitFunctBeginDI(const Function *F);
111 void Init(Module &M);
112 void EmitCompositeTypeDecls(Module &M);
113 void EmitFunctEndDI(const Function *F, unsigned Line);
114 void EmitAuxEntry(const std::string VarName, int Aux[],
115 int num = PIC16Dbg::AuxSize, std::string tag = "");
116 inline void EmitSymbol(std::string Name, short Class,
117 unsigned short Type = PIC16Dbg::T_NULL,
118 unsigned long Value = 0);
119 void EmitVarDebugInfo(Module &M);
120 void EmitFileDirective(Module &M);
121 void EmitFileDirective(GlobalVariable *CU, bool EmitEof = true);
123 void SetFunctBeginLine(unsigned line);
125 } // end namespace llvm;