forked from OSchip/llvm-project
[ELF] Internalize isBitcode. NFC
This commit is contained in:
parent
e8fd49f24b
commit
50f5f37b07
|
@ -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;
|
||||
|
|
|
@ -374,10 +374,6 @@ public:
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue