summaryrefslogtreecommitdiffstats
path: root/lld/ELF/InputFiles.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2019-07-03 06:11:50 +0000
committerRui Ueyama <ruiu@google.com>2019-07-03 06:11:50 +0000
commit11ae59f0cee2883307a5c1b67db54a832cc2bc35 (patch)
tree3efb31d29b775549a1830d47c438b4f4b6985cf4 /lld/ELF/InputFiles.cpp
parentc22e772a286b486c313ab2039409ff50562fd888 (diff)
downloadbcm5719-llvm-11ae59f0cee2883307a5c1b67db54a832cc2bc35.tar.gz
bcm5719-llvm-11ae59f0cee2883307a5c1b67db54a832cc2bc35.zip
Avoid identifiers that are different only in case. NFC.
Some variables in lld have the same name as functions ignoring case. This patch gives them different names, so that my next patch is easier to read. llvm-svn: 365003
Diffstat (limited to 'lld/ELF/InputFiles.cpp')
-rw-r--r--lld/ELF/InputFiles.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp
index e7bbfa19d3a..4d65ef37214 100644
--- a/lld/ELF/InputFiles.cpp
+++ b/lld/ELF/InputFiles.cpp
@@ -55,7 +55,7 @@ static ELFKind getELFKind(MemoryBufferRef MB, StringRef ArchiveName) {
unsigned char Endian;
std::tie(Size, Endian) = getElfArchType(MB.getBuffer());
- auto Fatal = [&](StringRef Msg) {
+ auto Report = [&](StringRef Msg) {
StringRef Filename = MB.getBufferIdentifier();
if (ArchiveName.empty())
fatal(Filename + ": " + Msg);
@@ -64,16 +64,16 @@ static ELFKind getELFKind(MemoryBufferRef MB, StringRef ArchiveName) {
};
if (!MB.getBuffer().startswith(ElfMagic))
- Fatal("not an ELF file");
+ Report("not an ELF file");
if (Endian != ELFDATA2LSB && Endian != ELFDATA2MSB)
- Fatal("corrupted ELF file: invalid data encoding");
+ Report("corrupted ELF file: invalid data encoding");
if (Size != ELFCLASS32 && Size != ELFCLASS64)
- Fatal("corrupted ELF file: invalid file class");
+ Report("corrupted ELF file: invalid file class");
size_t BufSize = MB.getBuffer().size();
if ((Size == ELFCLASS32 && BufSize < sizeof(Elf32_Ehdr)) ||
(Size == ELFCLASS64 && BufSize < sizeof(Elf64_Ehdr)))
- Fatal("corrupted ELF file: file is too short");
+ Report("corrupted ELF file: file is too short");
if (Size == ELFCLASS32)
return (Endian == ELFDATA2LSB) ? ELF32LEKind : ELF32BEKind;
OpenPOWER on IntegriCloud