summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/DebugInfo
diff options
context:
space:
mode:
authorJames Henderson <jh7370@my.bristol.ac.uk>2018-05-10 14:36:24 +0000
committerJames Henderson <jh7370@my.bristol.ac.uk>2018-05-10 14:36:24 +0000
commit198a87c8f3078f87f2893d82221c35abf5b94c01 (patch)
tree429dba9545876bec315094fbf6e1834bea4a0202 /llvm/unittests/DebugInfo
parenta5ad417589272f9b042d73a80bdfb0259db43f19 (diff)
downloadbcm5719-llvm-198a87c8f3078f87f2893d82221c35abf5b94c01.tar.gz
bcm5719-llvm-198a87c8f3078f87f2893d82221c35abf5b94c01.zip
[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
Diffstat (limited to 'llvm/unittests/DebugInfo')
-rw-r--r--llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp3
-rw-r--r--llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp2
-rw-r--r--llvm/unittests/DebugInfo/DWARF/DwarfGenerator.h8
3 files changed, 6 insertions, 7 deletions
diff --git a/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp b/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
index 22a3fd84ce5..7a0db571e2c 100644
--- a/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
+++ b/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
@@ -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() {
diff --git a/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp b/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
index 52d92f44078..4eb98c24b79 100644
--- a/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
+++ b/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
@@ -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();
}
diff --git a/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.h b/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.h
index 01f40e3855b..9912b894305 100644
--- a/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.h
+++ b/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.h
@@ -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;
OpenPOWER on IntegriCloud