-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[lld] Add missing includes. #143453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[lld] Add missing includes. #143453
Conversation
Some inline methods in these headers require a complete type but the corresponding include was missing.
@llvm/pr-subscribers-lld-coff @llvm/pr-subscribers-lld-elf Author: Jorge Gorbe Moya (slackito) ChangesSome inline methods in these headers require a complete type but the corresponding include was missing. Full diff: https://github.com/llvm/llvm-project/pull/143453.diff 2 Files Affected:
diff --git a/lld/COFF/TypeMerger.h b/lld/COFF/TypeMerger.h
index b4e3d6e7d9fdb..effb6d603a592 100644
--- a/lld/COFF/TypeMerger.h
+++ b/lld/COFF/TypeMerger.h
@@ -9,6 +9,7 @@
#ifndef LLD_COFF_TYPEMERGER_H
#define LLD_COFF_TYPEMERGER_H
+#include "COFFLinkerContext.h"
#include "Config.h"
#include "DebugTypes.h"
#include "lld/Common/Timer.h"
diff --git a/lld/ELF/DWARF.h b/lld/ELF/DWARF.h
index 64c25c706c343..19b17647378bd 100644
--- a/lld/ELF/DWARF.h
+++ b/lld/ELF/DWARF.h
@@ -10,6 +10,7 @@
#define LLD_ELF_DWARF_H
#include "InputFiles.h"
+#include "InputSection.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/STLFunctionalExtras.h"
#include "llvm/DebugInfo/DWARF/DWARFContext.h"
|
@llvm/pr-subscribers-lld Author: Jorge Gorbe Moya (slackito) ChangesSome inline methods in these headers require a complete type but the corresponding include was missing. Full diff: https://github.com/llvm/llvm-project/pull/143453.diff 2 Files Affected:
diff --git a/lld/COFF/TypeMerger.h b/lld/COFF/TypeMerger.h
index b4e3d6e7d9fdb..effb6d603a592 100644
--- a/lld/COFF/TypeMerger.h
+++ b/lld/COFF/TypeMerger.h
@@ -9,6 +9,7 @@
#ifndef LLD_COFF_TYPEMERGER_H
#define LLD_COFF_TYPEMERGER_H
+#include "COFFLinkerContext.h"
#include "Config.h"
#include "DebugTypes.h"
#include "lld/Common/Timer.h"
diff --git a/lld/ELF/DWARF.h b/lld/ELF/DWARF.h
index 64c25c706c343..19b17647378bd 100644
--- a/lld/ELF/DWARF.h
+++ b/lld/ELF/DWARF.h
@@ -10,6 +10,7 @@
#define LLD_ELF_DWARF_H
#include "InputFiles.h"
+#include "InputSection.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/STLFunctionalExtras.h"
#include "llvm/DebugInfo/DWARF/DWARFContext.h"
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/123/builds/21002 Here is the relevant piece of the build log for the reference
|
Can you elaborate on what the concrete issue was that was fixed here? Did compilation fail in some configuration? Or would compilation fail if you'd try to call some of the inline methods? |
I think it's triggered by building with modules enabled. The explanation of why it wasn't a problem until now needs a bit of context, please bear with me. For historical reasons, we (Google) have an internal bazel BUILD file for lld that slightly differs from the one in the LLVM repo. I'm trying to fix that. Our internal builds use modules, but in the current state, we build lld with bazel's layering check (that is, a check that every My guess is that less strict build configurations get the type definition via some transitive include (otherwise all builds would fail in this way), but this doesn't happen in a modular build so we need the explicit includes to get the type definitions. |
Some inline methods in these headers require a complete type but the corresponding include was missing.
Some inline methods in these headers require a complete type but the corresponding include was missing.
Some inline methods in these headers require a complete type but the corresponding include was missing.
Some inline methods in these headers require a complete type but the corresponding include was missing.