forked from OSchip/llvm-project
Make Discarded a InputSectionBase.
NFC, just a bit simpler. llvm-svn: 297087
This commit is contained in:
parent
7f18ec50ba
commit
2a80e1180e
|
@ -186,9 +186,7 @@ std::string InputSectionBase::getLocation(uint64_t Offset) {
|
|||
return (SrcFile + ":(" + Name + "+0x" + utohexstr(Offset) + ")").str();
|
||||
}
|
||||
|
||||
InputSection InputSection::Discarded;
|
||||
|
||||
InputSection::InputSection() : InputSectionBase() {}
|
||||
InputSectionBase InputSectionBase::Discarded;
|
||||
|
||||
InputSection::InputSection(uint64_t Flags, uint32_t Type, uint64_t Addralign,
|
||||
ArrayRef<uint8_t> Data, StringRef Name, Kind K)
|
||||
|
|
|
@ -64,6 +64,8 @@ public:
|
|||
uint32_t Link;
|
||||
uint32_t Info;
|
||||
|
||||
static InputSectionBase Discarded;
|
||||
|
||||
InputSectionBase()
|
||||
: SectionKind(Regular), Live(false), Assigned(false), Repl(this) {
|
||||
NumRelocations = 0;
|
||||
|
@ -250,15 +252,12 @@ public:
|
|||
// .eh_frame. It also includes the synthetic sections themselves.
|
||||
class InputSection : public InputSectionBase {
|
||||
public:
|
||||
InputSection();
|
||||
InputSection(uint64_t Flags, uint32_t Type, uint64_t Addralign,
|
||||
ArrayRef<uint8_t> Data, StringRef Name, Kind K = Regular);
|
||||
template <class ELFT>
|
||||
InputSection(ObjectFile<ELFT> *F, const typename ELFT::Shdr *Header,
|
||||
StringRef Name);
|
||||
|
||||
static InputSection Discarded;
|
||||
|
||||
// Write this section to a mmap'ed file, assuming Buf is pointing to
|
||||
// beginning of the output section.
|
||||
template <class ELFT> void writeTo(uint8_t *Buf);
|
||||
|
|
Loading…
Reference in New Issue