[DWARF] Remove unused member and fix(?) the unit-tests on big endian hosts

I can't verified the fix on a big endian host, so I'm not 100% certain it
will work.

llvm-svn: 331986
This commit is contained in:
James Henderson 2018-05-10 14:36:24 +00:00
parent a5ad417589
commit 198a87c8f3
3 changed files with 6 additions and 7 deletions

View File

@ -48,7 +48,8 @@ struct CommonFixture {
Context = createContext();
assert(Context != nullptr && "test state is not valid");
const DWARFObject &Obj = Context->getDWARFObj();
LineData = DWARFDataExtractor(Obj, Obj.getLineSection(), true, 8);
LineData = DWARFDataExtractor(Obj, Obj.getLineSection(),
sys::IsLittleEndianHost, 8);
}
std::unique_ptr<DWARFContext> createContext() {

View File

@ -497,6 +497,6 @@ dwarfgen::CompileUnit &dwarfgen::Generator::addCompileUnit() {
dwarfgen::LineTable &dwarfgen::Generator::addLineTable(DwarfFormat Format) {
LineTables.push_back(
make_unique<LineTable>(*this, Version, Format, Asm->getPointerSize()));
make_unique<LineTable>(Version, Format, Asm->getPointerSize()));
return *LineTables.back();
}

View File

@ -165,10 +165,9 @@ public:
ValueLength Length;
};
LineTable(Generator &DG, uint16_t Version, dwarf::DwarfFormat Format,
uint8_t AddrSize, uint8_t SegSize = 0)
: DG(DG), Version(Version), Format(Format), AddrSize(AddrSize),
SegSize(SegSize) {
LineTable(uint16_t Version, dwarf::DwarfFormat Format, uint8_t AddrSize,
uint8_t SegSize = 0)
: Version(Version), Format(Format), AddrSize(AddrSize), SegSize(SegSize) {
assert(Version >= 2 && Version <= 5 && "unsupported version");
}
@ -205,7 +204,6 @@ private:
void writeProloguePayload(const DWARFDebugLine::Prologue &Prologue,
AsmPrinter &Asm) const;
LLVM_ATTRIBUTE_UNUSED Generator &DG;
llvm::Optional<DWARFDebugLine::Prologue> Prologue;
std::vector<ValueAndLength> CustomPrologue;
std::vector<ValueAndLength> Contents;