Home | History | Annotate | Download | only in DWARF
      1 //===- DWARFDebugAranges.cpp ------------------------------------*- C++ -*-===//
      2 //
      3 //                     The LLVM Compiler Infrastructure
      4 //
      5 // This file is distributed under the University of Illinois Open Source
      6 // License. See LICENSE.TXT for details.
      7 //
      8 //===----------------------------------------------------------------------===//
      9 
     10 #include "llvm/DebugInfo/DWARF/DWARFAddressRange.h"
     11 
     12 #include "llvm/Support/Format.h"
     13 #include "llvm/Support/raw_ostream.h"
     14 
     15 using namespace llvm;
     16 
     17 void DWARFAddressRange::dump(raw_ostream &OS, uint32_t AddressSize,
     18                              DIDumpOptions DumpOpts) const {
     19 
     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 ? "" : ")");
     24 }
     25 
     26 raw_ostream &llvm::operator<<(raw_ostream &OS, const DWARFAddressRange &R) {
     27   R.dump(OS, /* AddressSize */ 8);
     28   return OS;
     29 }
     30