forked from OSchip/llvm-project
Remove const call to take_front
Summary: take_front() is a const member of StringRef. Calling it does nothing. This suggests that this line of code is useless, deleting it. But it's good to double check, what was the original intention here? (cherry picked from FBD21697637)
This commit is contained in:
parent
8729171182
commit
8a680745dd
|
@ -272,6 +272,7 @@ public:
|
|||
return reinterpret_cast<const uint8_t *>(getContents().data());
|
||||
}
|
||||
StringRef getContents() const { return Contents; }
|
||||
void clearContents() { Contents = {}; }
|
||||
bool hasSectionRef() const { return Section != SectionRef(); }
|
||||
SectionRef getSectionRef() const { return Section; }
|
||||
|
||||
|
|
|
@ -2580,7 +2580,7 @@ void RewriteInstance::emitAndLink() {
|
|||
if (BC->HasRelocations) {
|
||||
// The section is going to be regenerated from scratch.
|
||||
// Empty the contents, but keep the section reference.
|
||||
EHFrameSection->getContents().take_front(0);
|
||||
EHFrameSection->clearContents();
|
||||
} else {
|
||||
// Make .eh_frame relocatable.
|
||||
relocateEHFrameSection();
|
||||
|
|
Loading…
Reference in New Issue