[lld] 50f5f37 - [ELF] Internalize isBitcode. NFC
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 22 11:56:51 PDT 2022
Author: Fangrui Song
Date: 2022-07-22T11:56:46-07:00
New Revision: 50f5f37b07a1bced92cab730f994e7117cfac2a2
URL: https://github.com/llvm/llvm-project/commit/50f5f37b07a1bced92cab730f994e7117cfac2a2
DIFF: https://github.com/llvm/llvm-project/commit/50f5f37b07a1bced92cab730f994e7117cfac2a2.diff
LOG: [ELF] Internalize isBitcode. NFC
Added:
Modified:
lld/ELF/Driver.cpp
lld/ELF/InputFiles.h
Removed:
################################################################################
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index d4621c1affbc..dd17adc4dbea 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -197,6 +197,10 @@ std::vector<std::pair<MemoryBufferRef, uint64_t>> static getArchiveMembers(
return v;
}
+static bool isBitcode(MemoryBufferRef mb) {
+ return identify_magic(mb.getBuffer()) == llvm::file_magic::bitcode;
+}
+
// Opens a file and create a file object. Path has to be resolved already.
void LinkerDriver::addFile(StringRef path, bool withLOption) {
using namespace sys::fs;
diff --git a/lld/ELF/InputFiles.h b/lld/ELF/InputFiles.h
index 02538f44de2c..a24e664a7e16 100644
--- a/lld/ELF/InputFiles.h
+++ b/lld/ELF/InputFiles.h
@@ -374,10 +374,6 @@ class BinaryFile : public InputFile {
ELFFileBase *createObjFile(MemoryBufferRef mb, StringRef archiveName = "",
bool lazy = false);
-inline bool isBitcode(MemoryBufferRef mb) {
- return identify_magic(mb.getBuffer()) == llvm::file_magic::bitcode;
-}
-
std::string replaceThinLTOSuffix(StringRef path);
} // namespace elf
More information about the llvm-commits
mailing list