1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-02 00:42:52 +01:00
llvm-mirror/lib/CodeGen/AsmPrinter/DwarfLabel.cpp
Bill Wendling 5fe69fa68e Split out the Dwarf writer stuff into separate files. This is a much more
logical/sane approach to organizing all of the stuff that goes into writing out
DWARF information. Honestly? even this is too complex for what it's supposed to
be doing.

Trivia: It *looks* like there would be functionality changes, however there aren't!
llvm-svn: 71821
2009-05-15 00:11:17 +00:00

36 lines
895 B
C++

//===--- 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"
#include <ostream>
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
void DWLabel::print(std::ostream *O) const {
if (O) print(*O);
}
void DWLabel::print(std::ostream &O) const {
O << "." << Tag;
if (Number) O << Number;
}
#endif