projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4174d09
)
[LLD][ELF] - Add llvm_unreachable. NFC.
author
George Rimar
<grimar@accesssoftek.com>
Mon, 26 Nov 2018 10:07:10 +0000
(10:07 +0000)
committer
George Rimar
<grimar@accesssoftek.com>
Mon, 26 Nov 2018 10:07:10 +0000
(10:07 +0000)
We never should call writeTo() for BSS section.
llvm-svn: 347540
lld/ELF/SyntheticSections.h
patch
|
blob
|
history
diff --git
a/lld/ELF/SyntheticSections.h
b/lld/ELF/SyntheticSections.h
index
f35a8bb
..
3458bdf
100644
(file)
--- a/
lld/ELF/SyntheticSections.h
+++ b/
lld/ELF/SyntheticSections.h
@@
-170,7
+170,9
@@
private:
class BssSection final : public SyntheticSection {
public:
BssSection(StringRef Name, uint64_t Size, uint32_t Alignment);
- void writeTo(uint8_t *) override {}
+ void writeTo(uint8_t *) override {
+ llvm_unreachable("unexpected writeTo() call for SHT_NOBITS section");
+ }
bool empty() const override { return getSize() == 0; }
size_t getSize() const override { return Size; }