Bill Wendling | 88423ee | 2009-05-15 00:11:17 +0000 | [diff] [blame] | 1 | //===--- lib/CodeGen/DwarfLabel.cpp - Dwarf Label -------------------------===// |
| 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 | #include "DwarfLabel.h" |
| 15 | #include "llvm/ADT/FoldingSet.h" |
| 16 | #include <ostream> |
| 17 | |
| 18 | using namespace llvm; |
| 19 | |
| 20 | /// Profile - Used to gather unique data for the folding set. |
| 21 | /// |
| 22 | void DWLabel::Profile(FoldingSetNodeID &ID) const { |
| 23 | ID.AddString(Tag); |
| 24 | ID.AddInteger(Number); |
| 25 | } |
| 26 | |
| 27 | #ifndef NDEBUG |
| 28 | void DWLabel::print(std::ostream *O) const { |
| 29 | if (O) print(*O); |
| 30 | } |
| 31 | void DWLabel::print(std::ostream &O) const { |
| 32 | O << "." << Tag; |
| 33 | if (Number) O << Number; |
| 34 | } |
| 35 | #endif |