[lld] r198789 - [Mips] Add assert to check that we handle all paired relocations.
Simon Atanasyan
simon at atanasyan.com
Wed Jan 8 12:42:52 PST 2014
Author: atanasyan
Date: Wed Jan 8 14:42:52 2014
New Revision: 198789
URL: http://llvm.org/viewvc/llvm-project?rev=198789&view=rev
Log:
[Mips] Add assert to check that we handle all paired relocations.
Modified:
lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp
lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.h
Modified: lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp?rev=198789&r1=198788&r2=198789&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp Wed Jan 8 14:42:52 2014
@@ -95,6 +95,10 @@ MipsTargetRelocationHandler::MipsTargetR
const MipsLinkingContext &context, const MipsTargetHandler &handler)
: _targetHandler(handler) {}
+MipsTargetRelocationHandler::~MipsTargetRelocationHandler() {
+ assert(_pairedRelocations.empty());
+}
+
void
MipsTargetRelocationHandler::savePairedRelocation(const lld::AtomLayout &atom,
const Reference &ref) const {
Modified: lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.h?rev=198789&r1=198788&r2=198789&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.h Wed Jan 8 14:42:52 2014
@@ -22,6 +22,8 @@ public:
MipsTargetRelocationHandler(const MipsLinkingContext &context,
const MipsTargetHandler &handler);
+ ~MipsTargetRelocationHandler();
+
virtual error_code applyRelocation(ELFWriter &, llvm::FileOutputBuffer &,
const lld::AtomLayout &,
const Reference &) const;
More information about the llvm-commits
mailing list