diff options
author | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2009-05-28 18:24:11 +0000 |
---|---|---|
committer | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2009-05-28 18:24:11 +0000 |
commit | dd4694b519598993b3080103d16fdb9e17676f14 (patch) | |
tree | 43c00ef41f397f20fd567b004ed7d7cb5d9ed251 /lib/Target/PIC16/PIC16DebugInfo.h | |
parent | 43b41273f3e56f49449992436cc39b406c9a6350 (diff) | |
download | llvm-dd4694b519598993b3080103d16fdb9e17676f14.tar.gz llvm-dd4694b519598993b3080103d16fdb9e17676f14.tar.bz2 llvm-dd4694b519598993b3080103d16fdb9e17676f14.tar.xz |
Emit debug info for locals with proper scope.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72531 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PIC16/PIC16DebugInfo.h')
-rw-r--r-- | lib/Target/PIC16/PIC16DebugInfo.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/lib/Target/PIC16/PIC16DebugInfo.h b/lib/Target/PIC16/PIC16DebugInfo.h index 582d821eb3..96b23da403 100644 --- a/lib/Target/PIC16/PIC16DebugInfo.h +++ b/lib/Target/PIC16/PIC16DebugInfo.h @@ -14,7 +14,10 @@ #ifndef PIC16DBG_H #define PIC16DBG_H -#include "llvm/Analysis/DebugInfo.h" +#include "llvm/Analysis/DebugInfo.h" +#include "llvm/Module.h" +#include "llvm/Target/TargetAsmInfo.h" +#include <map> namespace llvm { namespace PIC16Dbg { @@ -80,14 +83,32 @@ namespace llvm { C_SECTION, C_EFCN = 255 }; + enum SymbolSize { + AuxSize =20 + }; } + class raw_ostream; + class PIC16DbgInfo { + std::map <std::string, DISubprogram *> FunctNameMap; + raw_ostream &O; + const TargetAsmInfo *TAI; public: + PIC16DbgInfo(raw_ostream &o, const TargetAsmInfo *T) : O(o), TAI(T) {} + ~PIC16DbgInfo(); void PopulateDebugInfo(DIType Ty, unsigned short &TypeNo, bool &HasAux, int Aux[], std::string &TypeName); unsigned GetTypeDebugNumber(std::string &type); short getClass(DIGlobalVariable DIGV); + void PopulateFunctsDI(Module &M); + DISubprogram *getFunctDI(std::string FunctName); + void EmitFunctBeginDI(const Function *F); + void EmitFunctEndDI(const Function *F, unsigned Line); + void EmitAuxEntry(const std::string VarName, int Aux[], int num); + inline void EmitSymbol(std::string Name, int Class); + void EmitVarDebugInfo(Module &M); + void EmitFileDirective(Module &M); }; } // end namespace llvm; #endif |