1 //===- DWARFDebugAranges.cpp ------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "llvm/DebugInfo/DWARF/DWARFAddressRange.h"
12 #include "llvm/Support/Format.h"
13 #include "llvm/Support/raw_ostream.h"
17 void DWARFAddressRange::dump(raw_ostream &OS, uint32_t AddressSize,
18 DIDumpOptions DumpOpts) const {
20 OS << (DumpOpts.DisplayRawContents ? " " : "[");
21 OS << format("0x%*.*" PRIx64 ", ", AddressSize * 2, AddressSize * 2, LowPC)
22 << format("0x%*.*" PRIx64, AddressSize * 2, AddressSize * 2, HighPC);
23 OS << (DumpOpts.DisplayRawContents ? "" : ")");
26 raw_ostream &llvm::operator<<(raw_ostream &OS, const DWARFAddressRange &R) {
27 R.dump(OS, /* AddressSize */ 8);