1c2dfd502SJames Henderson //===- DWARFDebugAranges.cpp ------------------------------------*- C++ -*-===//
2c2dfd502SJames Henderson //
32946cd70SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
42946cd70SChandler Carruth // See https://llvm.org/LICENSE.txt for license information.
52946cd70SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6c2dfd502SJames Henderson //
7c2dfd502SJames Henderson //===----------------------------------------------------------------------===//
8c2dfd502SJames Henderson
9c2dfd502SJames Henderson #include "llvm/DebugInfo/DWARF/DWARFAddressRange.h"
10*290e4823Sserge-sans-paille #include "llvm/DebugInfo/DIContext.h"
11dca2b36bSPavel Labath #include "llvm/DebugInfo/DWARF/DWARFFormValue.h"
12c2dfd502SJames Henderson #include "llvm/Support/raw_ostream.h"
13c2dfd502SJames Henderson
14c2dfd502SJames Henderson using namespace llvm;
15c2dfd502SJames Henderson
dump(raw_ostream & OS,uint32_t AddressSize,DIDumpOptions DumpOpts,const DWARFObject * Obj) const16a0729d41SWolfgang Pieb void DWARFAddressRange::dump(raw_ostream &OS, uint32_t AddressSize,
17dca2b36bSPavel Labath DIDumpOptions DumpOpts,
18dca2b36bSPavel Labath const DWARFObject *Obj) const {
19c2dfd502SJames Henderson
20a0729d41SWolfgang Pieb OS << (DumpOpts.DisplayRawContents ? " " : "[");
21ea83e0b1SDavid Blaikie DWARFFormValue::dumpAddress(OS, AddressSize, LowPC);
22ea83e0b1SDavid Blaikie OS << ", ";
23ea83e0b1SDavid Blaikie DWARFFormValue::dumpAddress(OS, AddressSize, HighPC);
24a0729d41SWolfgang Pieb OS << (DumpOpts.DisplayRawContents ? "" : ")");
25dca2b36bSPavel Labath
26dca2b36bSPavel Labath if (Obj)
27dca2b36bSPavel Labath DWARFFormValue::dumpAddressSection(*Obj, OS, DumpOpts, SectionIndex);
28c2dfd502SJames Henderson }
29c2dfd502SJames Henderson
operator <<(raw_ostream & OS,const DWARFAddressRange & R)30c2dfd502SJames Henderson raw_ostream &llvm::operator<<(raw_ostream &OS, const DWARFAddressRange &R) {
31c2dfd502SJames Henderson R.dump(OS, /* AddressSize */ 8);
32c2dfd502SJames Henderson return OS;
33c2dfd502SJames Henderson }
34