aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/lld/ELF/InputFiles.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/lld/ELF/InputFiles.cpp')
-rw-r--r--contrib/llvm-project/lld/ELF/InputFiles.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/llvm-project/lld/ELF/InputFiles.cpp b/contrib/llvm-project/lld/ELF/InputFiles.cpp
index 75e5ee1d0da4..a292e873e72f 100644
--- a/contrib/llvm-project/lld/ELF/InputFiles.cpp
+++ b/contrib/llvm-project/lld/ELF/InputFiles.cpp
@@ -1788,7 +1788,12 @@ void BinaryFile::parse() {
}
InputFile *elf::createInternalFile(StringRef name) {
- return make<InputFile>(InputFile::InternalKind, MemoryBufferRef("", name));
+ auto *file =
+ make<InputFile>(InputFile::InternalKind, MemoryBufferRef("", name));
+ // References from an internal file do not lead to --warn-backrefs
+ // diagnostics.
+ file->groupId = 0;
+ return file;
}
ELFFileBase *elf::createObjFile(MemoryBufferRef mb, StringRef archiveName,