LLVM API Documentation
00001 //===--- lib/CodeGen/DwarfLabel.cpp - Dwarf Label -------------------------===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // DWARF Labels 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #include "DwarfLabel.h" 00015 #include "llvm/ADT/FoldingSet.h" 00016 #include <ostream> 00017 00018 using namespace llvm; 00019 00020 /// Profile - Used to gather unique data for the folding set. 00021 /// 00022 void DWLabel::Profile(FoldingSetNodeID &ID) const { 00023 ID.AddString(Tag); 00024 ID.AddInteger(Number); 00025 } 00026 00027 #ifndef NDEBUG 00028 void DWLabel::print(std::ostream *O) const { 00029 if (O) print(*O); 00030 } 00031 void DWLabel::print(std::ostream &O) const { 00032 O << "." << Tag; 00033 if (Number) O << Number; 00034 } 00035 #endif