LLDB  mainline
DIERef.cpp
Go to the documentation of this file.
1 //===-- DIERef.cpp --------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #include "DIERef.h"
10 #include "llvm/Support/Format.h"
11 
12 void llvm::format_provider<DIERef>::format(const DIERef &ref, raw_ostream &OS,
13  StringRef Style) {
14  if (ref.dwo_num())
15  OS << format_hex_no_prefix(*ref.dwo_num(), 8) << "/";
16  OS << (ref.section() == DIERef::DebugInfo ? "INFO" : "TYPE");
17  OS << "/" << format_hex_no_prefix(ref.die_offset(), 8);
18 }
DIERef
Identifies a DWARF debug info entry within a given Module.
Definition: DIERef.h:26
DIERef.h
DIERef::die_offset
dw_offset_t die_offset() const
Definition: DIERef.h:45
llvm::format_provider< DIERef >::format
static void format(const DIERef &ref, raw_ostream &OS, StringRef Style)
Definition: DIERef.cpp:12
DIERef::DebugInfo
@ DebugInfo
Definition: DIERef.h:28
DIERef::section
Section section() const
Definition: DIERef.h:43
DIERef::dwo_num
llvm::Optional< uint32_t > dwo_num() const
Definition: DIERef.h:37