summaryrefslogtreecommitdiff
path: root/lib/Target/PIC16/PIC16DebugInfo.h
diff options
context:
space:
mode:
authorSanjiv Gupta <sanjiv.gupta@microchip.com>2009-06-16 09:45:18 +0000
committerSanjiv Gupta <sanjiv.gupta@microchip.com>2009-06-16 09:45:18 +0000
commitbde794207250602d8f12eb900d6412c1d50e47c3 (patch)
tree706df6b66b5cf8c47fbb3209872ae6f0560ba1e9 /lib/Target/PIC16/PIC16DebugInfo.h
parent8aa207ee306b6a5ce753511a5f811fc1cd2468e2 (diff)
downloadllvm-bde794207250602d8f12eb900d6412c1d50e47c3.tar.gz
llvm-bde794207250602d8f12eb900d6412c1d50e47c3.tar.bz2
llvm-bde794207250602d8f12eb900d6412c1d50e47c3.tar.xz
Code Restructuring. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73481 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PIC16/PIC16DebugInfo.h')
-rw-r--r--lib/Target/PIC16/PIC16DebugInfo.h53
1 files changed, 43 insertions, 10 deletions
diff --git a/lib/Target/PIC16/PIC16DebugInfo.h b/lib/Target/PIC16/PIC16DebugInfo.h
index 9d503807b2..d126d851b5 100644
--- a/lib/Target/PIC16/PIC16DebugInfo.h
+++ b/lib/Target/PIC16/PIC16DebugInfo.h
@@ -20,6 +20,8 @@
#include <map>
namespace llvm {
+ class MachineFunction;
+ class DebugLoc;
namespace PIC16Dbg {
enum VarType {
T_NULL,
@@ -94,33 +96,64 @@ namespace llvm {
raw_ostream &O;
const TargetAsmInfo *TAI;
std::string CurFile;
+ unsigned CurLine;
+
// EmitDebugDirectives is set if debug information is available. Default
// value for it is false.
bool EmitDebugDirectives;
- unsigned FunctBeginLine;
+
public:
PIC16DbgInfo(raw_ostream &o, const TargetAsmInfo *T) : O(o), TAI(T) {
- CurFile = "";
+ CurFile = "";
+ CurLine = 0;
EmitDebugDirectives = false;
}
- void PopulateDebugInfo(DIType Ty, unsigned short &TypeNo, bool &HasAux,
+
+ void BeginModule (Module &M);
+ void BeginFunction (const MachineFunction &MF);
+ void ChangeDebugLoc (const MachineFunction &MF, const DebugLoc &DL,
+ bool IsInBeginFunction = false);
+ void EndFunction (const MachineFunction &MF);
+ void EndModule (Module &M);
+
+
+ private:
+ void SwitchToCU (GlobalVariable *CU);
+ void SwitchToLine (unsigned Line, bool IsInBeginFunction = false);
+
+ void PopulateDebugInfo (DIType Ty, unsigned short &TypeNo, bool &HasAux,
int Aux[], std::string &TypeName);
- unsigned GetTypeDebugNumber(std::string &type);
- short getClass(DIGlobalVariable DIGV);
+ void PopulateBasicTypeInfo (DIType Ty, unsigned short &TypeNo);
+ void PopulateDerivedTypeInfo (DIType Ty, unsigned short &TypeNo,
+ bool &HasAux, int Aux[],
+ std::string &TypeName);
+
+ void PopulateCompositeTypeInfo (DIType Ty, unsigned short &TypeNo,
+ bool &HasAux, int Aux[],
+ std::string &TypeName);
+ void PopulateArrayTypeInfo (DIType Ty, unsigned short &TypeNo,
+ bool &HasAux, int Aux[],
+ std::string &TypeName);
+
+ void PopulateStructOrUnionTypeInfo (DIType Ty, unsigned short &TypeNo,
+ bool &HasAux, int Aux[],
+ std::string &TypeName);
+ void PopulateEnumTypeInfo (DIType Ty, unsigned short &TypeNo);
+
+ unsigned GetTypeDebugNumber(std::string &Type);
+ short getStorageClass(DIGlobalVariable DIGV);
void EmitFunctBeginDI(const Function *F);
- void Init(Module &M);
void EmitCompositeTypeDecls(Module &M);
+ void EmitCompositeTypeElements (DICompositeType CTy,
+ std::string UniqueSuffix);
void EmitFunctEndDI(const Function *F, unsigned Line);
void EmitAuxEntry(const std::string VarName, int Aux[],
- int num = PIC16Dbg::AuxSize, std::string tag = "");
+ int num = PIC16Dbg::AuxSize, std::string TagName = "");
inline void EmitSymbol(std::string Name, short Class,
unsigned short Type = PIC16Dbg::T_NULL,
unsigned long Value = 0);
void EmitVarDebugInfo(Module &M);
- void EmitFileDirective(Module &M);
- void EmitFileDirective(GlobalVariable *CU, bool EmitEof = true);
void EmitEOF();
- void SetFunctBeginLine(unsigned line);
};
} // end namespace llvm;
#endif