blob: 21f5d629e1e9ccde7fbc5de600b1dd78e7414ba9 [file] [log] [blame]
Bill Wendling88423ee2009-05-15 00:11:17 +00001//===--- lib/CodeGen/DIE.h - DWARF Info Entries -----------------*- C++ -*-===//
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// Data structures for DWARF info entries.
11//
12//===----------------------------------------------------------------------===//
13
Bill Wendling0310d762009-05-15 09:23:25 +000014#ifndef CODEGEN_ASMPRINTER_DIE_H__
15#define CODEGEN_ASMPRINTER_DIE_H__
Bill Wendling88423ee2009-05-15 00:11:17 +000016
17#include "DwarfLabel.h"
18#include "llvm/ADT/FoldingSet.h"
19#include "llvm/ADT/SmallVector.h"
20#include "llvm/Support/Compiler.h"
21#include "llvm/Support/Dwarf.h"
Chris Lattnerb01acfa2009-08-23 01:01:17 +000022#include <vector>
Bill Wendling88423ee2009-05-15 00:11:17 +000023
24namespace llvm {
25 class AsmPrinter;
Chris Lattner066c9ac2010-01-22 22:23:57 +000026 class DwarfPrinter;
Bill Wendling88423ee2009-05-15 00:11:17 +000027 class TargetData;
Chris Lattner858431d2010-01-16 18:50:28 +000028 class MCSymbol;
Bill Wendling88423ee2009-05-15 00:11:17 +000029
30 //===--------------------------------------------------------------------===//
31 /// DIEAbbrevData - Dwarf abbreviation data, describes the one attribute of a
32 /// Dwarf abbreviation.
Nick Lewycky381afae2009-11-17 09:17:08 +000033 class DIEAbbrevData {
Bill Wendling88423ee2009-05-15 00:11:17 +000034 /// Attribute - Dwarf attribute code.
35 ///
36 unsigned Attribute;
37
38 /// Form - Dwarf form code.
39 ///
40 unsigned Form;
41 public:
42 DIEAbbrevData(unsigned A, unsigned F) : Attribute(A), Form(F) {}
43
44 // Accessors.
45 unsigned getAttribute() const { return Attribute; }
46 unsigned getForm() const { return Form; }
47
48 /// Profile - Used to gather unique data for the abbreviation folding set.
49 ///
50 void Profile(FoldingSetNodeID &ID) const;
51 };
52
53 //===--------------------------------------------------------------------===//
54 /// DIEAbbrev - Dwarf abbreviation, describes the organization of a debug
55 /// information object.
Nick Lewycky381afae2009-11-17 09:17:08 +000056 class DIEAbbrev : public FoldingSetNode {
Bill Wendling88423ee2009-05-15 00:11:17 +000057 /// Tag - Dwarf tag code.
58 ///
59 unsigned Tag;
60
61 /// Unique number for node.
62 ///
63 unsigned Number;
64
65 /// ChildrenFlag - Dwarf children flag.
66 ///
67 unsigned ChildrenFlag;
68
69 /// Data - Raw data bytes for abbreviation.
70 ///
71 SmallVector<DIEAbbrevData, 8> Data;
Devang Patel6404e4e2009-12-15 19:16:48 +000072
Bill Wendling88423ee2009-05-15 00:11:17 +000073 public:
74 DIEAbbrev(unsigned T, unsigned C) : Tag(T), ChildrenFlag(C), Data() {}
75 virtual ~DIEAbbrev() {}
76
77 // Accessors.
78 unsigned getTag() const { return Tag; }
79 unsigned getNumber() const { return Number; }
80 unsigned getChildrenFlag() const { return ChildrenFlag; }
81 const SmallVector<DIEAbbrevData, 8> &getData() const { return Data; }
82 void setTag(unsigned T) { Tag = T; }
83 void setChildrenFlag(unsigned CF) { ChildrenFlag = CF; }
84 void setNumber(unsigned N) { Number = N; }
85
86 /// AddAttribute - Adds another set of attribute information to the
87 /// abbreviation.
88 void AddAttribute(unsigned Attribute, unsigned Form) {
89 Data.push_back(DIEAbbrevData(Attribute, Form));
90 }
91
92 /// AddFirstAttribute - Adds a set of attribute information to the front
93 /// of the abbreviation.
94 void AddFirstAttribute(unsigned Attribute, unsigned Form) {
95 Data.insert(Data.begin(), DIEAbbrevData(Attribute, Form));
96 }
97
98 /// Profile - Used to gather unique data for the abbreviation folding set.
99 ///
100 void Profile(FoldingSetNodeID &ID) const;
101
102 /// Emit - Print the abbreviation using the specified asm printer.
103 ///
Chris Lattner12e555c2010-01-23 00:15:00 +0000104 void Emit(const DwarfPrinter *DP) const;
Bill Wendling88423ee2009-05-15 00:11:17 +0000105
106#ifndef NDEBUG
Chris Lattnerb01acfa2009-08-23 01:01:17 +0000107 void print(raw_ostream &O);
Bill Wendling88423ee2009-05-15 00:11:17 +0000108 void dump();
109#endif
110 };
111
112 //===--------------------------------------------------------------------===//
113 /// DIE - A structured debug information entry. Has an abbreviation which
114 /// describes it's organization.
Bill Wendling88423ee2009-05-15 00:11:17 +0000115 class DIEValue;
116
Devang Patel6f01d9c2009-11-21 00:31:03 +0000117 class DIE {
Bill Wendling88423ee2009-05-15 00:11:17 +0000118 protected:
119 /// Abbrev - Buffer for constructing abbreviation.
120 ///
121 DIEAbbrev Abbrev;
122
123 /// Offset - Offset in debug info section.
124 ///
125 unsigned Offset;
126
127 /// Size - Size of instance + children.
128 ///
129 unsigned Size;
130
131 /// Children DIEs.
132 ///
133 std::vector<DIE *> Children;
134
Devang Patel6404e4e2009-12-15 19:16:48 +0000135 DIE *Parent;
136
Bill Wendling88423ee2009-05-15 00:11:17 +0000137 /// Attributes values.
138 ///
139 SmallVector<DIEValue*, 32> Values;
140
Owen Andersond5509f22009-06-24 23:13:56 +0000141 // Private data for print()
142 mutable unsigned IndentCount;
Bill Wendling88423ee2009-05-15 00:11:17 +0000143 public:
144 explicit DIE(unsigned Tag)
Owen Andersond5509f22009-06-24 23:13:56 +0000145 : Abbrev(Tag, dwarf::DW_CHILDREN_no), Offset(0),
Devang Patel6404e4e2009-12-15 19:16:48 +0000146 Size(0), Parent (0), IndentCount(0) {}
Bill Wendling88423ee2009-05-15 00:11:17 +0000147 virtual ~DIE();
148
149 // Accessors.
150 DIEAbbrev &getAbbrev() { return Abbrev; }
151 unsigned getAbbrevNumber() const { return Abbrev.getNumber(); }
152 unsigned getTag() const { return Abbrev.getTag(); }
153 unsigned getOffset() const { return Offset; }
154 unsigned getSize() const { return Size; }
155 const std::vector<DIE *> &getChildren() const { return Children; }
156 SmallVector<DIEValue*, 32> &getValues() { return Values; }
Devang Patel6404e4e2009-12-15 19:16:48 +0000157 DIE *getParent() const { return Parent; }
Bill Wendling88423ee2009-05-15 00:11:17 +0000158 void setTag(unsigned Tag) { Abbrev.setTag(Tag); }
159 void setOffset(unsigned O) { Offset = O; }
160 void setSize(unsigned S) { Size = S; }
Devang Patel6404e4e2009-12-15 19:16:48 +0000161
Devang Patel2c4ceb12009-11-21 02:48:08 +0000162 /// addValue - Add a value and attributes to a DIE.
Bill Wendling88423ee2009-05-15 00:11:17 +0000163 ///
Devang Patel2c4ceb12009-11-21 02:48:08 +0000164 void addValue(unsigned Attribute, unsigned Form, DIEValue *Value) {
Bill Wendling88423ee2009-05-15 00:11:17 +0000165 Abbrev.AddAttribute(Attribute, Form);
166 Values.push_back(Value);
167 }
168
169 /// SiblingOffset - Return the offset of the debug information entry's
170 /// sibling.
Devang Patel2c4ceb12009-11-21 02:48:08 +0000171 unsigned getSiblingOffset() const { return Offset + Size; }
Bill Wendling88423ee2009-05-15 00:11:17 +0000172
Devang Patel2c4ceb12009-11-21 02:48:08 +0000173 /// addSiblingOffset - Add a sibling offset field to the front of the DIE.
Bill Wendling88423ee2009-05-15 00:11:17 +0000174 ///
Devang Patel2c4ceb12009-11-21 02:48:08 +0000175 void addSiblingOffset();
Bill Wendling88423ee2009-05-15 00:11:17 +0000176
Devang Patel2c4ceb12009-11-21 02:48:08 +0000177 /// addChild - Add a child to the DIE.
Bill Wendling88423ee2009-05-15 00:11:17 +0000178 ///
Devang Patel2c4ceb12009-11-21 02:48:08 +0000179 void addChild(DIE *Child) {
Devang Patel6404e4e2009-12-15 19:16:48 +0000180 if (Child->getParent()) {
181 assert (Child->getParent() == this && "Unexpected DIE Parent!");
182 return;
183 }
Bill Wendling88423ee2009-05-15 00:11:17 +0000184 Abbrev.setChildrenFlag(dwarf::DW_CHILDREN_yes);
185 Children.push_back(Child);
Jeffrey Yasskin9467f0e2010-03-07 17:10:13 +0000186 Child->Parent = this;
Bill Wendling88423ee2009-05-15 00:11:17 +0000187 }
188
Bill Wendling88423ee2009-05-15 00:11:17 +0000189#ifndef NDEBUG
Chris Lattnerb01acfa2009-08-23 01:01:17 +0000190 void print(raw_ostream &O, unsigned IncIndent = 0);
Bill Wendling88423ee2009-05-15 00:11:17 +0000191 void dump();
192#endif
193 };
194
195 //===--------------------------------------------------------------------===//
196 /// DIEValue - A debug information entry value.
197 ///
Devang Patel6f01d9c2009-11-21 00:31:03 +0000198 class DIEValue {
Bill Wendling88423ee2009-05-15 00:11:17 +0000199 public:
200 enum {
201 isInteger,
202 isString,
203 isLabel,
204 isAsIsLabel,
205 isSectionOffset,
206 isDelta,
207 isEntry,
208 isBlock
209 };
210 protected:
211 /// Type - Type of data stored in the value.
212 ///
213 unsigned Type;
214 public:
215 explicit DIEValue(unsigned T) : Type(T) {}
216 virtual ~DIEValue() {}
217
218 // Accessors
219 unsigned getType() const { return Type; }
220
221 /// EmitValue - Emit value via the Dwarf writer.
222 ///
Chris Lattner066c9ac2010-01-22 22:23:57 +0000223 virtual void EmitValue(DwarfPrinter *D, unsigned Form) const = 0;
Bill Wendling88423ee2009-05-15 00:11:17 +0000224
225 /// SizeOf - Return the size of a value in bytes.
226 ///
227 virtual unsigned SizeOf(const TargetData *TD, unsigned Form) const = 0;
228
Bill Wendling88423ee2009-05-15 00:11:17 +0000229 // Implement isa/cast/dyncast.
230 static bool classof(const DIEValue *) { return true; }
231
232#ifndef NDEBUG
Chris Lattnerb01acfa2009-08-23 01:01:17 +0000233 virtual void print(raw_ostream &O) = 0;
Bill Wendling88423ee2009-05-15 00:11:17 +0000234 void dump();
235#endif
236 };
237
238 //===--------------------------------------------------------------------===//
239 /// DIEInteger - An integer value DIE.
240 ///
Nick Lewycky381afae2009-11-17 09:17:08 +0000241 class DIEInteger : public DIEValue {
Bill Wendling88423ee2009-05-15 00:11:17 +0000242 uint64_t Integer;
243 public:
244 explicit DIEInteger(uint64_t I) : DIEValue(isInteger), Integer(I) {}
245
246 /// BestForm - Choose the best form for integer.
247 ///
248 static unsigned BestForm(bool IsSigned, uint64_t Int) {
249 if (IsSigned) {
250 if ((char)Int == (signed)Int) return dwarf::DW_FORM_data1;
251 if ((short)Int == (signed)Int) return dwarf::DW_FORM_data2;
252 if ((int)Int == (signed)Int) return dwarf::DW_FORM_data4;
253 } else {
254 if ((unsigned char)Int == Int) return dwarf::DW_FORM_data1;
255 if ((unsigned short)Int == Int) return dwarf::DW_FORM_data2;
256 if ((unsigned int)Int == Int) return dwarf::DW_FORM_data4;
257 }
258 return dwarf::DW_FORM_data8;
259 }
260
261 /// EmitValue - Emit integer of appropriate size.
262 ///
Chris Lattner066c9ac2010-01-22 22:23:57 +0000263 virtual void EmitValue(DwarfPrinter *D, unsigned Form) const;
Bill Wendling88423ee2009-05-15 00:11:17 +0000264
265 /// SizeOf - Determine size of integer value in bytes.
266 ///
267 virtual unsigned SizeOf(const TargetData *TD, unsigned Form) const;
268
Bill Wendling88423ee2009-05-15 00:11:17 +0000269
270 // Implement isa/cast/dyncast.
271 static bool classof(const DIEInteger *) { return true; }
272 static bool classof(const DIEValue *I) { return I->getType() == isInteger; }
273
274#ifndef NDEBUG
Chris Lattnerb01acfa2009-08-23 01:01:17 +0000275 virtual void print(raw_ostream &O);
Bill Wendling88423ee2009-05-15 00:11:17 +0000276#endif
277 };
278
279 //===--------------------------------------------------------------------===//
Devang Patel69f57b12009-12-02 15:25:16 +0000280 /// DIEString - A string value DIE. This DIE keeps string reference only.
Bill Wendling88423ee2009-05-15 00:11:17 +0000281 ///
Nick Lewycky381afae2009-11-17 09:17:08 +0000282 class DIEString : public DIEValue {
Devang Patele9a05972009-11-24 19:42:17 +0000283 const StringRef Str;
Bill Wendling88423ee2009-05-15 00:11:17 +0000284 public:
Devang Patele9a05972009-11-24 19:42:17 +0000285 explicit DIEString(const StringRef S) : DIEValue(isString), Str(S) {}
Bill Wendling88423ee2009-05-15 00:11:17 +0000286
287 /// EmitValue - Emit string value.
288 ///
Chris Lattner066c9ac2010-01-22 22:23:57 +0000289 virtual void EmitValue(DwarfPrinter *D, unsigned Form) const;
Bill Wendling88423ee2009-05-15 00:11:17 +0000290
291 /// SizeOf - Determine size of string value in bytes.
292 ///
293 virtual unsigned SizeOf(const TargetData *, unsigned /*Form*/) const {
294 return Str.size() + sizeof(char); // sizeof('\0');
295 }
296
Bill Wendling88423ee2009-05-15 00:11:17 +0000297 // Implement isa/cast/dyncast.
298 static bool classof(const DIEString *) { return true; }
299 static bool classof(const DIEValue *S) { return S->getType() == isString; }
300
301#ifndef NDEBUG
Chris Lattnerb01acfa2009-08-23 01:01:17 +0000302 virtual void print(raw_ostream &O);
Bill Wendling88423ee2009-05-15 00:11:17 +0000303#endif
304 };
305
306 //===--------------------------------------------------------------------===//
307 /// DIEDwarfLabel - A Dwarf internal label expression DIE.
308 //
Nick Lewycky381afae2009-11-17 09:17:08 +0000309 class DIEDwarfLabel : public DIEValue {
Bill Wendling88423ee2009-05-15 00:11:17 +0000310 const DWLabel Label;
311 public:
312 explicit DIEDwarfLabel(const DWLabel &L) : DIEValue(isLabel), Label(L) {}
313
314 /// EmitValue - Emit label value.
315 ///
Chris Lattner066c9ac2010-01-22 22:23:57 +0000316 virtual void EmitValue(DwarfPrinter *D, unsigned Form) const;
Bill Wendling88423ee2009-05-15 00:11:17 +0000317
318 /// SizeOf - Determine size of label value in bytes.
319 ///
320 virtual unsigned SizeOf(const TargetData *TD, unsigned Form) const;
321
Bill Wendling88423ee2009-05-15 00:11:17 +0000322 // Implement isa/cast/dyncast.
323 static bool classof(const DIEDwarfLabel *) { return true; }
324 static bool classof(const DIEValue *L) { return L->getType() == isLabel; }
325
326#ifndef NDEBUG
Chris Lattnerb01acfa2009-08-23 01:01:17 +0000327 virtual void print(raw_ostream &O);
Bill Wendling88423ee2009-05-15 00:11:17 +0000328#endif
329 };
330
331 //===--------------------------------------------------------------------===//
332 /// DIEObjectLabel - A label to an object in code or data.
333 //
Nick Lewycky381afae2009-11-17 09:17:08 +0000334 class DIEObjectLabel : public DIEValue {
Chris Lattner858431d2010-01-16 18:50:28 +0000335 const MCSymbol *Sym;
Bill Wendling88423ee2009-05-15 00:11:17 +0000336 public:
Chris Lattner858431d2010-01-16 18:50:28 +0000337 explicit DIEObjectLabel(const MCSymbol *S)
338 : DIEValue(isAsIsLabel), Sym(S) {}
Bill Wendling88423ee2009-05-15 00:11:17 +0000339
340 /// EmitValue - Emit label value.
341 ///
Chris Lattner066c9ac2010-01-22 22:23:57 +0000342 virtual void EmitValue(DwarfPrinter *D, unsigned Form) const;
Bill Wendling88423ee2009-05-15 00:11:17 +0000343
344 /// SizeOf - Determine size of label value in bytes.
345 ///
346 virtual unsigned SizeOf(const TargetData *TD, unsigned Form) const;
347
Bill Wendling88423ee2009-05-15 00:11:17 +0000348 // Implement isa/cast/dyncast.
349 static bool classof(const DIEObjectLabel *) { return true; }
350 static bool classof(const DIEValue *L) {
351 return L->getType() == isAsIsLabel;
352 }
353
354#ifndef NDEBUG
Chris Lattnerb01acfa2009-08-23 01:01:17 +0000355 virtual void print(raw_ostream &O);
Bill Wendling88423ee2009-05-15 00:11:17 +0000356#endif
357 };
358
359 //===--------------------------------------------------------------------===//
360 /// DIESectionOffset - A section offset DIE.
361 ///
Nick Lewycky381afae2009-11-17 09:17:08 +0000362 class DIESectionOffset : public DIEValue {
Bill Wendling88423ee2009-05-15 00:11:17 +0000363 const DWLabel Label;
364 const DWLabel Section;
365 bool IsEH : 1;
366 bool UseSet : 1;
367 public:
368 DIESectionOffset(const DWLabel &Lab, const DWLabel &Sec,
369 bool isEH = false, bool useSet = true)
370 : DIEValue(isSectionOffset), Label(Lab), Section(Sec),
371 IsEH(isEH), UseSet(useSet) {}
372
373 /// EmitValue - Emit section offset.
374 ///
Chris Lattner066c9ac2010-01-22 22:23:57 +0000375 virtual void EmitValue(DwarfPrinter *D, unsigned Form) const;
Bill Wendling88423ee2009-05-15 00:11:17 +0000376
377 /// SizeOf - Determine size of section offset value in bytes.
378 ///
379 virtual unsigned SizeOf(const TargetData *TD, unsigned Form) const;
380
Bill Wendling88423ee2009-05-15 00:11:17 +0000381 // Implement isa/cast/dyncast.
382 static bool classof(const DIESectionOffset *) { return true; }
383 static bool classof(const DIEValue *D) {
384 return D->getType() == isSectionOffset;
385 }
386
387#ifndef NDEBUG
Chris Lattnerb01acfa2009-08-23 01:01:17 +0000388 virtual void print(raw_ostream &O);
Bill Wendling88423ee2009-05-15 00:11:17 +0000389#endif
390 };
391
392 //===--------------------------------------------------------------------===//
393 /// DIEDelta - A simple label difference DIE.
394 ///
Nick Lewycky381afae2009-11-17 09:17:08 +0000395 class DIEDelta : public DIEValue {
Bill Wendling88423ee2009-05-15 00:11:17 +0000396 const DWLabel LabelHi;
397 const DWLabel LabelLo;
398 public:
399 DIEDelta(const DWLabel &Hi, const DWLabel &Lo)
400 : DIEValue(isDelta), LabelHi(Hi), LabelLo(Lo) {}
401
402 /// EmitValue - Emit delta value.
403 ///
Chris Lattner066c9ac2010-01-22 22:23:57 +0000404 virtual void EmitValue(DwarfPrinter *D, unsigned Form) const;
Bill Wendling88423ee2009-05-15 00:11:17 +0000405
406 /// SizeOf - Determine size of delta value in bytes.
407 ///
408 virtual unsigned SizeOf(const TargetData *TD, unsigned Form) const;
409
Bill Wendling88423ee2009-05-15 00:11:17 +0000410 // Implement isa/cast/dyncast.
411 static bool classof(const DIEDelta *) { return true; }
412 static bool classof(const DIEValue *D) { return D->getType() == isDelta; }
413
414#ifndef NDEBUG
Chris Lattnerb01acfa2009-08-23 01:01:17 +0000415 virtual void print(raw_ostream &O);
Bill Wendling88423ee2009-05-15 00:11:17 +0000416#endif
417 };
418
419 //===--------------------------------------------------------------------===//
420 /// DIEntry - A pointer to another debug information entry. An instance of
421 /// this class can also be used as a proxy for a debug information entry not
422 /// yet defined (ie. types.)
Nick Lewycky381afae2009-11-17 09:17:08 +0000423 class DIEEntry : public DIEValue {
Bill Wendling88423ee2009-05-15 00:11:17 +0000424 DIE *Entry;
425 public:
426 explicit DIEEntry(DIE *E) : DIEValue(isEntry), Entry(E) {}
427
428 DIE *getEntry() const { return Entry; }
429 void setEntry(DIE *E) { Entry = E; }
430
431 /// EmitValue - Emit debug information entry offset.
432 ///
Chris Lattner066c9ac2010-01-22 22:23:57 +0000433 virtual void EmitValue(DwarfPrinter *D, unsigned Form) const;
Bill Wendling88423ee2009-05-15 00:11:17 +0000434
435 /// SizeOf - Determine size of debug information entry in bytes.
436 ///
437 virtual unsigned SizeOf(const TargetData *TD, unsigned Form) const {
438 return sizeof(int32_t);
439 }
440
Bill Wendling88423ee2009-05-15 00:11:17 +0000441 // Implement isa/cast/dyncast.
442 static bool classof(const DIEEntry *) { return true; }
443 static bool classof(const DIEValue *E) { return E->getType() == isEntry; }
444
445#ifndef NDEBUG
Chris Lattnerb01acfa2009-08-23 01:01:17 +0000446 virtual void print(raw_ostream &O);
Bill Wendling88423ee2009-05-15 00:11:17 +0000447#endif
448 };
449
450 //===--------------------------------------------------------------------===//
451 /// DIEBlock - A block of values. Primarily used for location expressions.
452 //
Nick Lewycky381afae2009-11-17 09:17:08 +0000453 class DIEBlock : public DIEValue, public DIE {
Bill Wendling88423ee2009-05-15 00:11:17 +0000454 unsigned Size; // Size in bytes excluding size header.
455 public:
456 DIEBlock()
457 : DIEValue(isBlock), DIE(0), Size(0) {}
458 virtual ~DIEBlock() {}
459
460 /// ComputeSize - calculate the size of the block.
461 ///
462 unsigned ComputeSize(const TargetData *TD);
463
464 /// BestForm - Choose the best form for data.
465 ///
466 unsigned BestForm() const {
467 if ((unsigned char)Size == Size) return dwarf::DW_FORM_block1;
468 if ((unsigned short)Size == Size) return dwarf::DW_FORM_block2;
469 if ((unsigned int)Size == Size) return dwarf::DW_FORM_block4;
470 return dwarf::DW_FORM_block;
471 }
472
473 /// EmitValue - Emit block data.
474 ///
Chris Lattner066c9ac2010-01-22 22:23:57 +0000475 virtual void EmitValue(DwarfPrinter *D, unsigned Form) const;
Bill Wendling88423ee2009-05-15 00:11:17 +0000476
477 /// SizeOf - Determine size of block data in bytes.
478 ///
479 virtual unsigned SizeOf(const TargetData *TD, unsigned Form) const;
480
Bill Wendling88423ee2009-05-15 00:11:17 +0000481 // Implement isa/cast/dyncast.
482 static bool classof(const DIEBlock *) { return true; }
483 static bool classof(const DIEValue *E) { return E->getType() == isBlock; }
484
485#ifndef NDEBUG
Chris Lattnerb01acfa2009-08-23 01:01:17 +0000486 virtual void print(raw_ostream &O);
Bill Wendling88423ee2009-05-15 00:11:17 +0000487#endif
488 };
489
490} // end llvm namespace
491
492#endif