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