summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2018-07-17 14:36:19 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2018-07-17 14:36:19 +0000
commit46ae0afba7bc80389095335da5dbed63bf3d7ba9 (patch)
tree0ff36bc01841d4ba9e71e15e5817215f4910cdd3
parentdeb8c7d396fb77911a6bc980370271e31797ad6d (diff)
downloadbcm5719-llvm-46ae0afba7bc80389095335da5dbed63bf3d7ba9.tar.gz
bcm5719-llvm-46ae0afba7bc80389095335da5dbed63bf3d7ba9.zip
[ELF] - Eliminate dead 'return' in EhFrameSection::finalizeContents(). NFC.
EhFrameSection::finalizeContents() is called from a single place: https://github.com/llvm-mirror/lld/blob/master/ELF/Writer.cpp#L1559 So code was dead. llvm-svn: 337287
-rw-r--r--lld/ELF/SyntheticSections.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp
index 27ba726cd7e..0d208943656 100644
--- a/lld/ELF/SyntheticSections.cpp
+++ b/lld/ELF/SyntheticSections.cpp
@@ -474,9 +474,7 @@ static void writeCieFde(uint8_t *Buf, ArrayRef<uint8_t> D) {
}
void EhFrameSection::finalizeContents() {
- if (this->Size)
- return; // Already finalized.
-
+ assert(!this->Size); // Not finalized.
size_t Off = 0;
for (CieRecord *Rec : CieRecords) {
Rec->Cie->OutputOff = Off;
OpenPOWER on IntegriCloud