blob: 582d821eb3041bd21854c5665b611962a05a2018 [file] [log] [blame]
Sanjiv Guptaa57bc3b2009-05-22 13:58:45 +00001//===-- PIC16DebugInfo.h - Interfaces for PIC16 Debug Information ============//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file contains the helper functions for representing debug information.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef PIC16DBG_H
15#define PIC16DBG_H
16
17#include "llvm/Analysis/DebugInfo.h"
18
19namespace llvm {
20 namespace PIC16Dbg {
21 enum VarType {
22 T_NULL,
23 T_VOID,
24 T_CHAR,
25 T_SHORT,
26 T_INT,
27 T_LONG,
28 T_FLOAT,
29 T_DOUBLE,
30 T_STRUCT,
31 T_UNION,
32 T_ENUM,
33 T_MOE,
34 T_UCHAR,
35 T_USHORT,
36 T_UINT,
37 T_ULONG
38 };
39 enum DerivedType {
40 DT_NONE,
41 DT_PTR,
42 DT_FCN,
43 DT_ARY
44 };
45 enum TypeSize {
46 S_BASIC = 5,
47 S_DERIVED = 3
48 };
49 enum DbgClass {
50 C_NULL,
51 C_AUTO,
52 C_EXT,
53 C_STAT,
54 C_REG,
55 C_EXTDEF,
56 C_LABEL,
57 C_ULABEL,
58 C_MOS,
59 C_ARG,
60 C_STRTAG,
61 C_MOU,
62 C_UNTAG,
63 C_TPDEF,
64 C_USTATIC,
65 C_ENTAG,
66 C_MOE,
67 C_REGPARM,
68 C_FIELD,
69 C_AUTOARG,
70 C_LASTENT,
71 C_BLOCK = 100,
72 C_FCN,
73 C_EOS,
74 C_FILE,
75 C_LINE,
76 C_ALIAS,
77 C_HIDDEN,
78 C_EOF,
79 C_LIST,
80 C_SECTION,
81 C_EFCN = 255
82 };
83 }
84
85 class PIC16DbgInfo {
86 public:
87 void PopulateDebugInfo(DIType Ty, unsigned short &TypeNo, bool &HasAux,
88 int Aux[], std::string &TypeName);
89 unsigned GetTypeDebugNumber(std::string &type);
90 short getClass(DIGlobalVariable DIGV);
91 };
92} // end namespace llvm;
93#endif