diff options
author | dim <dim@FreeBSD.org> | 2014-11-24 09:08:18 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2014-11-24 09:08:18 +0000 |
commit | e27feadae0885aa074df58ebfda2e7a7f7a7d590 (patch) | |
tree | f5944309621cee4fe0976be6f9ac619b7ebfc4c2 /lib/DebugInfo/DWARFDebugArangeSet.cpp | |
parent | 87ba4fbed530c9d0dff7505d121035f5ed09c9f3 (diff) | |
download | FreeBSD-src-e27feadae0885aa074df58ebfda2e7a7f7a7d590.zip FreeBSD-src-e27feadae0885aa074df58ebfda2e7a7f7a7d590.tar.gz |
Vendor import of llvm RELEASE_350/final tag r216957 (effectively, 3.5.0 release):
https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_350/final@216957
Diffstat (limited to 'lib/DebugInfo/DWARFDebugArangeSet.cpp')
-rw-r--r-- | lib/DebugInfo/DWARFDebugArangeSet.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/DebugInfo/DWARFDebugArangeSet.cpp b/lib/DebugInfo/DWARFDebugArangeSet.cpp index 229376e..c0a33ce 100644 --- a/lib/DebugInfo/DWARFDebugArangeSet.cpp +++ b/lib/DebugInfo/DWARFDebugArangeSet.cpp @@ -67,7 +67,9 @@ DWARFDebugArangeSet::extract(DataExtractor data, uint32_t *offset_ptr) { Descriptor arangeDescriptor; - assert(sizeof(arangeDescriptor.Address) == sizeof(arangeDescriptor.Length)); + static_assert(sizeof(arangeDescriptor.Address) == + sizeof(arangeDescriptor.Length), + "Different datatypes for addresses and sizes!"); assert(sizeof(arangeDescriptor.Address) >= HeaderData.AddrSize); while (data.isValidOffset(*offset_ptr)) { @@ -94,9 +96,9 @@ void DWARFDebugArangeSet::dump(raw_ostream &OS) const { HeaderData.CuOffset, HeaderData.AddrSize, HeaderData.SegSize); const uint32_t hex_width = HeaderData.AddrSize * 2; - for (DescriptorConstIter pos = ArangeDescriptors.begin(), - end = ArangeDescriptors.end(); pos != end; ++pos) - OS << format("[0x%*.*" PRIx64 " -", hex_width, hex_width, pos->Address) + for (const auto &Desc : ArangeDescriptors) { + OS << format("[0x%*.*" PRIx64 " -", hex_width, hex_width, Desc.Address) << format(" 0x%*.*" PRIx64 ")\n", - hex_width, hex_width, pos->getEndAddress()); + hex_width, hex_width, Desc.getEndAddress()); + } } |