Mercurial > hg > CbC > CbC_llvm
comparison lib/DebugInfo/DWARF/DWARFAddressRange.cpp @ 148:63bd29f05246
merged
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 14 Aug 2019 19:46:37 +0900 |
parents | c2174574ed3a |
children |
comparison
equal
deleted
inserted
replaced
146:3fc4d5c3e21e | 148:63bd29f05246 |
---|---|
1 //===- DWARFDebugAranges.cpp ------------------------------------*- C++ -*-===// | 1 //===- DWARFDebugAranges.cpp ------------------------------------*- C++ -*-===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 // | 4 // See https://llvm.org/LICENSE.txt for license information. |
5 // This file is distributed under the University of Illinois Open Source | 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 // License. See LICENSE.TXT for details. | |
7 // | 6 // |
8 //===----------------------------------------------------------------------===// | 7 //===----------------------------------------------------------------------===// |
9 | 8 |
10 #include "llvm/DebugInfo/DWARF/DWARFAddressRange.h" | 9 #include "llvm/DebugInfo/DWARF/DWARFAddressRange.h" |
11 | 10 |
12 #include "llvm/Support/Format.h" | 11 #include "llvm/Support/Format.h" |
13 #include "llvm/Support/raw_ostream.h" | 12 #include "llvm/Support/raw_ostream.h" |
14 | 13 |
15 using namespace llvm; | 14 using namespace llvm; |
16 | 15 |
17 void DWARFAddressRange::dump(raw_ostream &OS, uint32_t AddressSize) const { | 16 void DWARFAddressRange::dump(raw_ostream &OS, uint32_t AddressSize, |
17 DIDumpOptions DumpOpts) const { | |
18 | 18 |
19 OS << format("[0x%*.*" PRIx64 ", ", AddressSize * 2, AddressSize * 2, LowPC) | 19 OS << (DumpOpts.DisplayRawContents ? " " : "["); |
20 << format(" 0x%*.*" PRIx64 ")", AddressSize * 2, AddressSize * 2, HighPC); | 20 OS << format("0x%*.*" PRIx64 ", ", AddressSize * 2, AddressSize * 2, LowPC) |
21 << format("0x%*.*" PRIx64, AddressSize * 2, AddressSize * 2, HighPC); | |
22 OS << (DumpOpts.DisplayRawContents ? "" : ")"); | |
21 } | 23 } |
22 | 24 |
23 raw_ostream &llvm::operator<<(raw_ostream &OS, const DWARFAddressRange &R) { | 25 raw_ostream &llvm::operator<<(raw_ostream &OS, const DWARFAddressRange &R) { |
24 R.dump(OS, /* AddressSize */ 8); | 26 R.dump(OS, /* AddressSize */ 8); |
25 return OS; | 27 return OS; |