mirror of
https://github.com/RPCS3/llvm.git
synced 2026-01-31 01:25:19 +01:00
[llvm-pdbdump] Abstract some of the YAML/Raw printing code.
There is a lot of duplicate code for printing line info between YAML and the raw output printer. This introduces a base class that can be shared between the two, and makes some minor cleanups in the process. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301728 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
//===- ModuleDebugLineFragment.cpp --------------------------------*- C++
|
||||
//-*-===//
|
||||
//===- ModuleDebugLineFragment.cpp -------------------------------*- C++-*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
@@ -24,7 +23,7 @@ Error LineColumnExtractor::extract(BinaryStreamRef Stream, uint32_t &Len,
|
||||
BinaryStreamReader Reader(Stream);
|
||||
if (auto EC = Reader.readObject(BlockHeader))
|
||||
return EC;
|
||||
bool HasColumn = Header->Flags & uint32_t(LineFlags::HaveColumns);
|
||||
bool HasColumn = Header->Flags & uint16_t(LF_HaveColumns);
|
||||
uint32_t LineInfoSize =
|
||||
BlockHeader->NumLines *
|
||||
(sizeof(LineNumberEntry) + (HasColumn ? sizeof(ColumnNumberEntry) : 0));
|
||||
@@ -61,3 +60,7 @@ Error ModuleDebugLineFragment::initialize(BinaryStreamReader Reader) {
|
||||
|
||||
return Error::success();
|
||||
}
|
||||
|
||||
bool ModuleDebugLineFragment::hasColumnInfo() const {
|
||||
return Header->Flags & LF_HaveColumns;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user