2009-05-15 00:11:17 +00:00
|
|
|
//===--- lib/CodeGen/DwarfLabel.cpp - Dwarf Label -------------------------===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// DWARF Labels
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "DwarfLabel.h"
|
|
|
|
#include "llvm/ADT/FoldingSet.h"
|
2009-08-23 01:01:17 +00:00
|
|
|
#include "llvm/Support/raw_ostream.h"
|
2009-05-15 00:11:17 +00:00
|
|
|
|
|
|
|
using namespace llvm;
|
|
|
|
|
|
|
|
/// Profile - Used to gather unique data for the folding set.
|
|
|
|
///
|
|
|
|
void DWLabel::Profile(FoldingSetNodeID &ID) const {
|
|
|
|
ID.AddString(Tag);
|
|
|
|
ID.AddInteger(Number);
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifndef NDEBUG
|
2009-08-23 01:01:17 +00:00
|
|
|
void DWLabel::print(raw_ostream &O) const {
|
2009-05-15 00:11:17 +00:00
|
|
|
O << "." << Tag;
|
|
|
|
if (Number) O << Number;
|
|
|
|
}
|
|
|
|
#endif
|