blob: 6e9293a03bd540390433aed3735023603e449b3e [file] [log] [blame]
Bill Wendling88423ee2009-05-15 00:11:17 +00001//===--- 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"
Chris Lattnerb01acfa2009-08-23 01:01:17 +000016#include "llvm/Support/raw_ostream.h"
Bill Wendling88423ee2009-05-15 00:11:17 +000017
18using namespace llvm;
19
20/// Profile - Used to gather unique data for the folding set.
21///
22void DWLabel::Profile(FoldingSetNodeID &ID) const {
23 ID.AddString(Tag);
24 ID.AddInteger(Number);
25}
26
27#ifndef NDEBUG
Chris Lattnerb01acfa2009-08-23 01:01:17 +000028void DWLabel::print(raw_ostream &O) const {
Bill Wendling88423ee2009-05-15 00:11:17 +000029 O << "." << Tag;
30 if (Number) O << Number;
31}
32#endif