1 //===--- lib/CodeGen/DwarfLabel.h - Dwarf Label -----------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
12 //===----------------------------------------------------------------------===//
14 #ifndef DWARFLABEL_H__
15 #define DWARFLABEL_H__
17 #include "llvm/Support/Compiler.h"
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
35 /// Number - Value to make label unique.
39 DWLabel(const char *T, unsigned N) : Tag(T), Number(N) {}
42 const char *getTag() const { return Tag; }
43 unsigned getNumber() const { return Number; }
45 /// Profile - Used to gather unique data for the folding set.
47 void Profile(FoldingSetNodeID &ID) const;
50 void print(std::ostream *O) const;
51 void print(std::ostream &O) const;
54 } // end llvm namespace