Strip trailing whitespace.
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DwarfLabel.h
1 //===--- lib/CodeGen/DwarfLabel.h - Dwarf Label -----------------*- 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 // DWARF Labels.
11 // 
12 //===----------------------------------------------------------------------===//
13
14 #ifndef CODEGEN_ASMPRINTER_DWARFLABEL_H__
15 #define CODEGEN_ASMPRINTER_DWARFLABEL_H__
16
17 namespace llvm {
18   class FoldingSetNodeID;
19   class raw_ostream;
20
21   //===--------------------------------------------------------------------===//
22   /// DWLabel - Labels are used to track locations in the assembler file.
23   /// Labels appear in the form @verbatim <prefix><Tag><Number> @endverbatim,
24   /// where the tag is a category of label (Ex. location) and number is a value
25   /// unique in that category.
26   class DWLabel {
27     /// Tag - Label category tag. Should always be a statically declared C
28     /// string.
29     /// 
30     const char *Tag;
31
32     /// Number - Value to make label unique.
33     /// 
34     unsigned Number;
35   public:
36     DWLabel(const char *T, unsigned N) : Tag(T), Number(N) {}
37
38     // Accessors.
39     const char *getTag() const { return Tag; }
40     unsigned getNumber() const { return Number; }
41
42     /// Profile - Used to gather unique data for the folding set.
43     ///
44     void Profile(FoldingSetNodeID &ID) const;
45
46 #ifndef NDEBUG
47     void print(raw_ostream &O) const;
48 #endif
49   };
50 } // end llvm namespace
51
52 #endif