File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -118,9 +118,9 @@ class InputSectionBase : public SectionBase {
118
118
119
119
static bool classof (const SectionBase *s) { return s->kind () != Output; }
120
120
121
- // The file which contains this section. Its dynamic type is always
122
- // ObjFile<ELFT>, but in order to avoid ELFT, we use InputFile as
123
- // its static type .
121
+ // The file which contains this section. Its dynamic type is usually
122
+ // ObjFile<ELFT>, but may be an InputFile of InternalKind (for a synthetic
123
+ // section) .
124
124
InputFile *file;
125
125
126
126
// Input sections are part of an output section. Special sections
@@ -132,8 +132,9 @@ class InputSectionBase : public SectionBase {
132
132
// Section index of the relocation section if exists.
133
133
uint32_t relSecIdx = 0 ;
134
134
135
+ // Getter when the dynamic type is ObjFile<ELFT>.
135
136
template <class ELFT > ObjFile<ELFT> *getFile () const {
136
- return cast_or_null <ObjFile<ELFT>>(file);
137
+ return cast <ObjFile<ELFT>>(file);
137
138
}
138
139
139
140
// Used by --optimize-bb-jumps and RISC-V linker relaxation temporarily to
You can’t perform that action at this time.
0 commit comments