[flang-commits] [flang] [clang] [compiler-rt] [lldb] [libclc] [llvm] [libcxxabi] [mlir] [lld] [libcxx] [clang-tools-extra] [libc] [ELF] Add internal InputFile (PR #78944)

Andrew Ng via flang-commits flang-commits at lists.llvm.org
Tue Jan 23 07:49:43 PST 2024


================

----------------
nga888 wrote:

Hi @MaskRay,

I think that the addition of `ctx.internalFile` has broken this statement from `class InputSectionBase`:
```
// The file which contains this section. Its dynamic type is always
// ObjFile<ELFT>, but in order to avoid ELFT, we use InputFile as
// its static type.
InputFile *file;
```

Which can then subsequently cause assertion failures in:
```
template <class ELFT> ObjFile<ELFT> *getFile() const {
  return cast_or_null<ObjFile<ELFT>>(file);
}
```

This is happening in our downstream port of `lld`, although I haven't yet figured out why we are only hitting this code path.

https://github.com/llvm/llvm-project/pull/78944


More information about the flang-commits mailing list