Skip to content

Commit ce13dd1

Browse files
committed
[ELF] Replace fatal with Fatal(ctx)
1 parent a626eb2 commit ce13dd1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lld/ELF/InputFiles.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class Symbol;
3737

3838
// Returns "<internal>", "foo.a(bar.o)" or "baz.o".
3939
std::string toStr(Ctx &, const InputFile *f);
40+
const ELFSyncStream &operator<<(const ELFSyncStream &, const InputFile *);
4041

4142
// Opens a given file.
4243
std::optional<MemoryBufferRef> readFile(Ctx &, StringRef path);
@@ -101,7 +102,7 @@ class InputFile {
101102
Symbol &getSymbol(uint32_t symbolIndex) const {
102103
assert(fileKind == ObjKind);
103104
if (symbolIndex >= numSymbols)
104-
fatal(toStr(ctx, this) + ": invalid symbol index");
105+
Fatal(ctx) << this << ": invalid symbol index";
105106
return *this->symbols[symbolIndex];
106107
}
107108

@@ -386,8 +387,6 @@ ELFFileBase *createObjFile(Ctx &, MemoryBufferRef mb,
386387

387388
std::string replaceThinLTOSuffix(Ctx &, StringRef path);
388389

389-
const ELFSyncStream &operator<<(const ELFSyncStream &, const InputFile *);
390-
391390
} // namespace elf
392391
} // namespace lld
393392

0 commit comments

Comments
 (0)