diff options
author | Bill Wendling <isanbard@gmail.com> | 2009-05-15 00:11:17 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2009-05-15 00:11:17 +0000 |
commit | 88423eecd0f16d3cfa89bdf92abdb72a5dc0616a (patch) | |
tree | 14a131cd9d6a504192d16f8c7274f6353c197c2c /lib/CodeGen/AsmPrinter/DwarfLabel.cpp | |
parent | 5f00b0c5b63c30c7ad6134543318551902de5c93 (diff) |
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!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71821 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfLabel.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfLabel.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfLabel.cpp b/lib/CodeGen/AsmPrinter/DwarfLabel.cpp new file mode 100644 index 0000000000..8021b7c97b --- /dev/null +++ b/lib/CodeGen/AsmPrinter/DwarfLabel.cpp @@ -0,0 +1,35 @@ +//===--- 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 |