[Lldb-commits] [clang] [clang-tools-extra] [lld] [lldb] [llvm] [mlir] [polly] [NFC] Add explicit #include llvm-config.h where its macros are used. (PR #106810)

2024-08-30 Thread Daniil Fukalov via lldb-commits

https://github.com/dfukalov created 
https://github.com/llvm/llvm-project/pull/106810

This is the second part.

Without these explicit includes, removing other headers, who implicitly include 
llvm-config.h, may have non-trivial side effects. For example, `clagd` may 
report even `llvm-config.h` as "no used" in case it defines a macro, that is 
expicitly used with #ifdef. It is actually amplified with different build 
configs which use different set of macros.

>From 0221e97459534f0f7396e7970663e1a4f1f98cca Mon Sep 17 00:00:00 2001
From: dfukalov 
Date: Sat, 31 Aug 2024 01:45:27 +0200
Subject: [PATCH] [NFC] Add explicit #include llvm-config.h where its macros
 are used, part 2.

Without these explicit includes, removing other headers, who implicitly include 
llvm-config.h, may have non-trivial side effects.
For example, `clagd` may report even `llvm-config.h` as "no used" in case it 
defines a macro, that is expicitly used with #ifdef.
It is actually amplified with different build configs which use different set 
of macros.
---
 bolt/include/bolt/Core/BinaryBasicBlock.h | 1 +
 clang-tools-extra/clangd/Feature.cpp  | 1 +
 clang-tools-extra/clangd/unittests/ClangdTests.cpp| 1 +
 clang-tools-extra/clangd/unittests/CompileCommandsTests.cpp   | 1 +
 clang-tools-extra/clangd/unittests/SerializationTests.cpp | 1 +
 clang/include/clang/Interpreter/Value.h   | 1 +
 clang/lib/Driver/ToolChains/Cuda.cpp  | 1 +
 clang/lib/Driver/ToolChains/MinGW.cpp | 1 +
 clang/lib/Driver/ToolChains/WebAssembly.cpp   | 1 +
 clang/lib/Frontend/FrontendActions.cpp| 1 +
 clang/tools/driver/driver.cpp | 2 ++
 clang/unittests/Driver/GCCVersionTest.cpp | 1 +
 lld/ELF/OutputSections.cpp| 2 +-
 lldb/source/API/SBDebugger.cpp| 1 +
 lldb/source/Host/common/Host.cpp  | 1 +
 .../Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | 1 +
 .../Process/gdb-remote/GDBRemoteCommunicationClient.cpp   | 1 +
 lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp  | 1 +
 lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp  | 1 +
 lldb/unittests/Host/MainLoopTest.cpp  | 1 +
 llvm/include/llvm/Debuginfod/HTTPClient.h | 1 +
 llvm/include/llvm/Debuginfod/HTTPServer.h | 1 +
 llvm/include/llvm/Support/ErrorHandling.h | 1 +
 llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp| 1 +
 llvm/lib/Analysis/InlineAdvisor.cpp   | 1 +
 llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp | 1 +
 llvm/lib/Analysis/ModelUnderTrainingRunner.cpp| 1 +
 llvm/lib/Analysis/TFLiteUtils.cpp | 1 +
 llvm/lib/CodeGen/MLRegAllocEvictAdvisor.cpp   | 1 +
 llvm/lib/CodeGen/MLRegAllocPriorityAdvisor.cpp| 1 +
 llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp  | 1 +
 llvm/lib/CodeGen/RegAllocPriorityAdvisor.cpp  | 1 +
 llvm/lib/DebugInfo/PDB/PDB.cpp| 1 +
 llvm/lib/Debuginfod/HTTPClient.cpp| 1 +
 llvm/lib/Debuginfod/HTTPServer.cpp| 1 +
 llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp  | 1 +
 llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderVTune.cpp | 1 +
 llvm/lib/IR/Core.cpp  | 1 +
 llvm/lib/MC/SPIRVObjectWriter.cpp | 1 +
 llvm/lib/Support/CRC.cpp  | 1 +
 llvm/lib/Support/Compression.cpp  | 1 +
 llvm/lib/Support/Z3Solver.cpp | 1 +
 llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp | 1 +
 llvm/lib/TargetParser/Unix/Host.inc   | 1 +
 llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp| 1 +
 llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp| 1 +
 .../Analysis/InlineAdvisorPlugin/InlineAdvisorPlugin.cpp  | 4 ++--
 .../Analysis/InlineOrderPlugin/InlineOrderPlugin.cpp  | 4 ++--
 llvm/unittests/Analysis/PluginInlineAdvisorAnalysisTest.cpp   | 1 +
 llvm/unittests/Analysis/PluginInlineOrderAnalysisTest.cpp | 1 +
 llvm/unittests/Debuginfod/HTTPServerTests.cpp | 1 +
 llvm/unittests/Passes/Plugins/PluginsTest.cpp | 1 +
 llvm/unittests/Support/CompressionTest.cpp| 1 +
 llvm/unittests/TargetParser/Host.cpp  | 2 +-
 llvm/unittests/tools/llvm-profdata/OutputSizeLimitTest.cpp| 1 +
 mlir/include/mlir/Bytecode/BytecodeWriter.h   | 1 +
 mlir/lib/Target/SPIRV/SPIRVBinaryUtils.cpp| 1 +
 mlir/unitt

[Lldb-commits] [clang] [clang-tools-extra] [lld] [lldb] [llvm] [mlir] [polly] [NFC] Add explicit #include llvm-config.h where its macros are used. (PR #106810)

2024-08-31 Thread Daniil Fukalov via lldb-commits

https://github.com/dfukalov edited 
https://github.com/llvm/llvm-project/pull/106810
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [clang-tools-extra] [lld] [lldb] [llvm] [mlir] [polly] [NFC] Add explicit #include llvm-config.h where its macros are used. (PR #106810)

2024-09-03 Thread Daniil Fukalov via lldb-commits

https://github.com/dfukalov updated 
https://github.com/llvm/llvm-project/pull/106810

>From 0221e97459534f0f7396e7970663e1a4f1f98cca Mon Sep 17 00:00:00 2001
From: dfukalov 
Date: Sat, 31 Aug 2024 01:45:27 +0200
Subject: [PATCH 1/2] [NFC] Add explicit #include llvm-config.h where its
 macros are used, part 2.

Without these explicit includes, removing other headers, who implicitly include 
llvm-config.h, may have non-trivial side effects.
For example, `clagd` may report even `llvm-config.h` as "no used" in case it 
defines a macro, that is expicitly used with #ifdef.
It is actually amplified with different build configs which use different set 
of macros.
---
 bolt/include/bolt/Core/BinaryBasicBlock.h | 1 +
 clang-tools-extra/clangd/Feature.cpp  | 1 +
 clang-tools-extra/clangd/unittests/ClangdTests.cpp| 1 +
 clang-tools-extra/clangd/unittests/CompileCommandsTests.cpp   | 1 +
 clang-tools-extra/clangd/unittests/SerializationTests.cpp | 1 +
 clang/include/clang/Interpreter/Value.h   | 1 +
 clang/lib/Driver/ToolChains/Cuda.cpp  | 1 +
 clang/lib/Driver/ToolChains/MinGW.cpp | 1 +
 clang/lib/Driver/ToolChains/WebAssembly.cpp   | 1 +
 clang/lib/Frontend/FrontendActions.cpp| 1 +
 clang/tools/driver/driver.cpp | 2 ++
 clang/unittests/Driver/GCCVersionTest.cpp | 1 +
 lld/ELF/OutputSections.cpp| 2 +-
 lldb/source/API/SBDebugger.cpp| 1 +
 lldb/source/Host/common/Host.cpp  | 1 +
 .../Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | 1 +
 .../Process/gdb-remote/GDBRemoteCommunicationClient.cpp   | 1 +
 lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp  | 1 +
 lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp  | 1 +
 lldb/unittests/Host/MainLoopTest.cpp  | 1 +
 llvm/include/llvm/Debuginfod/HTTPClient.h | 1 +
 llvm/include/llvm/Debuginfod/HTTPServer.h | 1 +
 llvm/include/llvm/Support/ErrorHandling.h | 1 +
 llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp| 1 +
 llvm/lib/Analysis/InlineAdvisor.cpp   | 1 +
 llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp | 1 +
 llvm/lib/Analysis/ModelUnderTrainingRunner.cpp| 1 +
 llvm/lib/Analysis/TFLiteUtils.cpp | 1 +
 llvm/lib/CodeGen/MLRegAllocEvictAdvisor.cpp   | 1 +
 llvm/lib/CodeGen/MLRegAllocPriorityAdvisor.cpp| 1 +
 llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp  | 1 +
 llvm/lib/CodeGen/RegAllocPriorityAdvisor.cpp  | 1 +
 llvm/lib/DebugInfo/PDB/PDB.cpp| 1 +
 llvm/lib/Debuginfod/HTTPClient.cpp| 1 +
 llvm/lib/Debuginfod/HTTPServer.cpp| 1 +
 llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp  | 1 +
 llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderVTune.cpp | 1 +
 llvm/lib/IR/Core.cpp  | 1 +
 llvm/lib/MC/SPIRVObjectWriter.cpp | 1 +
 llvm/lib/Support/CRC.cpp  | 1 +
 llvm/lib/Support/Compression.cpp  | 1 +
 llvm/lib/Support/Z3Solver.cpp | 1 +
 llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp | 1 +
 llvm/lib/TargetParser/Unix/Host.inc   | 1 +
 llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp| 1 +
 llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp| 1 +
 .../Analysis/InlineAdvisorPlugin/InlineAdvisorPlugin.cpp  | 4 ++--
 .../Analysis/InlineOrderPlugin/InlineOrderPlugin.cpp  | 4 ++--
 llvm/unittests/Analysis/PluginInlineAdvisorAnalysisTest.cpp   | 1 +
 llvm/unittests/Analysis/PluginInlineOrderAnalysisTest.cpp | 1 +
 llvm/unittests/Debuginfod/HTTPServerTests.cpp | 1 +
 llvm/unittests/Passes/Plugins/PluginsTest.cpp | 1 +
 llvm/unittests/Support/CompressionTest.cpp| 1 +
 llvm/unittests/TargetParser/Host.cpp  | 2 +-
 llvm/unittests/tools/llvm-profdata/OutputSizeLimitTest.cpp| 1 +
 mlir/include/mlir/Bytecode/BytecodeWriter.h   | 1 +
 mlir/lib/Target/SPIRV/SPIRVBinaryUtils.cpp| 1 +
 mlir/unittests/Target/LLVM/SerializeNVVMTarget.cpp| 1 +
 polly/lib/Support/RegisterPasses.cpp  | 1 +
 59 files changed, 62 insertions(+), 6 deletions(-)

diff --git a/bolt/include/bolt/Core/BinaryBasicBlock.h 
b/bolt/include/bolt/Core/BinaryBasicBlock.h
index 9a9d7b8735d714..b4f31cf2bae6f6 100644
--- a/bolt/include/bolt/Core/BinaryBasicBlock.h
+++ 

[Lldb-commits] [clang] [clang-tools-extra] [lld] [lldb] [llvm] [mlir] [polly] [NFC] Add explicit #include llvm-config.h where its macros are used. (PR #106810)

2024-09-04 Thread Daniil Fukalov via lldb-commits

https://github.com/dfukalov updated 
https://github.com/llvm/llvm-project/pull/106810

>From 0221e97459534f0f7396e7970663e1a4f1f98cca Mon Sep 17 00:00:00 2001
From: dfukalov 
Date: Sat, 31 Aug 2024 01:45:27 +0200
Subject: [PATCH 1/3] [NFC] Add explicit #include llvm-config.h where its
 macros are used, part 2.

Without these explicit includes, removing other headers, who implicitly include 
llvm-config.h, may have non-trivial side effects.
For example, `clagd` may report even `llvm-config.h` as "no used" in case it 
defines a macro, that is expicitly used with #ifdef.
It is actually amplified with different build configs which use different set 
of macros.
---
 bolt/include/bolt/Core/BinaryBasicBlock.h | 1 +
 clang-tools-extra/clangd/Feature.cpp  | 1 +
 clang-tools-extra/clangd/unittests/ClangdTests.cpp| 1 +
 clang-tools-extra/clangd/unittests/CompileCommandsTests.cpp   | 1 +
 clang-tools-extra/clangd/unittests/SerializationTests.cpp | 1 +
 clang/include/clang/Interpreter/Value.h   | 1 +
 clang/lib/Driver/ToolChains/Cuda.cpp  | 1 +
 clang/lib/Driver/ToolChains/MinGW.cpp | 1 +
 clang/lib/Driver/ToolChains/WebAssembly.cpp   | 1 +
 clang/lib/Frontend/FrontendActions.cpp| 1 +
 clang/tools/driver/driver.cpp | 2 ++
 clang/unittests/Driver/GCCVersionTest.cpp | 1 +
 lld/ELF/OutputSections.cpp| 2 +-
 lldb/source/API/SBDebugger.cpp| 1 +
 lldb/source/Host/common/Host.cpp  | 1 +
 .../Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | 1 +
 .../Process/gdb-remote/GDBRemoteCommunicationClient.cpp   | 1 +
 lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp  | 1 +
 lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp  | 1 +
 lldb/unittests/Host/MainLoopTest.cpp  | 1 +
 llvm/include/llvm/Debuginfod/HTTPClient.h | 1 +
 llvm/include/llvm/Debuginfod/HTTPServer.h | 1 +
 llvm/include/llvm/Support/ErrorHandling.h | 1 +
 llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp| 1 +
 llvm/lib/Analysis/InlineAdvisor.cpp   | 1 +
 llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp | 1 +
 llvm/lib/Analysis/ModelUnderTrainingRunner.cpp| 1 +
 llvm/lib/Analysis/TFLiteUtils.cpp | 1 +
 llvm/lib/CodeGen/MLRegAllocEvictAdvisor.cpp   | 1 +
 llvm/lib/CodeGen/MLRegAllocPriorityAdvisor.cpp| 1 +
 llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp  | 1 +
 llvm/lib/CodeGen/RegAllocPriorityAdvisor.cpp  | 1 +
 llvm/lib/DebugInfo/PDB/PDB.cpp| 1 +
 llvm/lib/Debuginfod/HTTPClient.cpp| 1 +
 llvm/lib/Debuginfod/HTTPServer.cpp| 1 +
 llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp  | 1 +
 llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderVTune.cpp | 1 +
 llvm/lib/IR/Core.cpp  | 1 +
 llvm/lib/MC/SPIRVObjectWriter.cpp | 1 +
 llvm/lib/Support/CRC.cpp  | 1 +
 llvm/lib/Support/Compression.cpp  | 1 +
 llvm/lib/Support/Z3Solver.cpp | 1 +
 llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp | 1 +
 llvm/lib/TargetParser/Unix/Host.inc   | 1 +
 llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp| 1 +
 llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp| 1 +
 .../Analysis/InlineAdvisorPlugin/InlineAdvisorPlugin.cpp  | 4 ++--
 .../Analysis/InlineOrderPlugin/InlineOrderPlugin.cpp  | 4 ++--
 llvm/unittests/Analysis/PluginInlineAdvisorAnalysisTest.cpp   | 1 +
 llvm/unittests/Analysis/PluginInlineOrderAnalysisTest.cpp | 1 +
 llvm/unittests/Debuginfod/HTTPServerTests.cpp | 1 +
 llvm/unittests/Passes/Plugins/PluginsTest.cpp | 1 +
 llvm/unittests/Support/CompressionTest.cpp| 1 +
 llvm/unittests/TargetParser/Host.cpp  | 2 +-
 llvm/unittests/tools/llvm-profdata/OutputSizeLimitTest.cpp| 1 +
 mlir/include/mlir/Bytecode/BytecodeWriter.h   | 1 +
 mlir/lib/Target/SPIRV/SPIRVBinaryUtils.cpp| 1 +
 mlir/unittests/Target/LLVM/SerializeNVVMTarget.cpp| 1 +
 polly/lib/Support/RegisterPasses.cpp  | 1 +
 59 files changed, 62 insertions(+), 6 deletions(-)

diff --git a/bolt/include/bolt/Core/BinaryBasicBlock.h 
b/bolt/include/bolt/Core/BinaryBasicBlock.h
index 9a9d7b8735d714..b4f31cf2bae6f6 100644
--- a/bolt/include/bolt/Core/BinaryBasicBlock.h
+++ 

[Lldb-commits] [clang] [clang-tools-extra] [lld] [lldb] [llvm] [mlir] [polly] [NFC] Add explicit #include llvm-config.h where its macros are used. (PR #106810)

2024-09-04 Thread Daniil Fukalov via lldb-commits

https://github.com/dfukalov ready_for_review 
https://github.com/llvm/llvm-project/pull/106810
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [clang-tools-extra] [lld] [lldb] [llvm] [mlir] [polly] [NFC] Add explicit #include llvm-config.h where its macros are used. (PR #106810)

2024-09-04 Thread Daniil Fukalov via lldb-commits

https://github.com/dfukalov updated 
https://github.com/llvm/llvm-project/pull/106810

>From 7e9c4b1d0da02cf923a790c8025ac1e1a333094e Mon Sep 17 00:00:00 2001
From: dfukalov 
Date: Sat, 31 Aug 2024 01:45:27 +0200
Subject: [PATCH 1/3] [NFC] Add explicit #include llvm-config.h where its
 macros are used, part 2.

Without these explicit includes, removing other headers, who implicitly include 
llvm-config.h, may have non-trivial side effects.
For example, `clagd` may report even `llvm-config.h` as "no used" in case it 
defines a macro, that is expicitly used with #ifdef.
It is actually amplified with different build configs which use different set 
of macros.
---
 bolt/include/bolt/Core/BinaryBasicBlock.h | 1 +
 clang-tools-extra/clangd/Feature.cpp  | 1 +
 clang-tools-extra/clangd/unittests/ClangdTests.cpp| 1 +
 clang-tools-extra/clangd/unittests/CompileCommandsTests.cpp   | 1 +
 clang-tools-extra/clangd/unittests/SerializationTests.cpp | 1 +
 clang/include/clang/Interpreter/Value.h   | 1 +
 clang/lib/Driver/ToolChains/Cuda.cpp  | 1 +
 clang/lib/Driver/ToolChains/MinGW.cpp | 1 +
 clang/lib/Driver/ToolChains/WebAssembly.cpp   | 1 +
 clang/lib/Frontend/FrontendActions.cpp| 1 +
 clang/tools/driver/driver.cpp | 2 ++
 clang/unittests/Driver/GCCVersionTest.cpp | 1 +
 lld/ELF/OutputSections.cpp| 2 +-
 lldb/source/API/SBDebugger.cpp| 1 +
 lldb/source/Host/common/Host.cpp  | 1 +
 .../Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | 1 +
 .../Process/gdb-remote/GDBRemoteCommunicationClient.cpp   | 1 +
 lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp  | 1 +
 lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp  | 1 +
 lldb/unittests/Host/MainLoopTest.cpp  | 1 +
 llvm/include/llvm/Debuginfod/HTTPClient.h | 1 +
 llvm/include/llvm/Debuginfod/HTTPServer.h | 1 +
 llvm/include/llvm/Support/ErrorHandling.h | 1 +
 llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp| 1 +
 llvm/lib/Analysis/InlineAdvisor.cpp   | 1 +
 llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp | 1 +
 llvm/lib/Analysis/ModelUnderTrainingRunner.cpp| 1 +
 llvm/lib/Analysis/TFLiteUtils.cpp | 1 +
 llvm/lib/CodeGen/MLRegAllocEvictAdvisor.cpp   | 1 +
 llvm/lib/CodeGen/MLRegAllocPriorityAdvisor.cpp| 1 +
 llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp  | 1 +
 llvm/lib/CodeGen/RegAllocPriorityAdvisor.cpp  | 1 +
 llvm/lib/DebugInfo/PDB/PDB.cpp| 1 +
 llvm/lib/Debuginfod/HTTPClient.cpp| 1 +
 llvm/lib/Debuginfod/HTTPServer.cpp| 1 +
 llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp  | 1 +
 llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderVTune.cpp | 1 +
 llvm/lib/IR/Core.cpp  | 1 +
 llvm/lib/MC/SPIRVObjectWriter.cpp | 1 +
 llvm/lib/Support/CRC.cpp  | 1 +
 llvm/lib/Support/Compression.cpp  | 1 +
 llvm/lib/Support/Z3Solver.cpp | 1 +
 llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp | 1 +
 llvm/lib/TargetParser/Unix/Host.inc   | 1 +
 llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp| 1 +
 llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp| 1 +
 .../Analysis/InlineAdvisorPlugin/InlineAdvisorPlugin.cpp  | 4 ++--
 .../Analysis/InlineOrderPlugin/InlineOrderPlugin.cpp  | 4 ++--
 llvm/unittests/Analysis/PluginInlineAdvisorAnalysisTest.cpp   | 1 +
 llvm/unittests/Analysis/PluginInlineOrderAnalysisTest.cpp | 1 +
 llvm/unittests/Debuginfod/HTTPServerTests.cpp | 1 +
 llvm/unittests/Passes/Plugins/PluginsTest.cpp | 1 +
 llvm/unittests/Support/CompressionTest.cpp| 1 +
 llvm/unittests/TargetParser/Host.cpp  | 2 +-
 llvm/unittests/tools/llvm-profdata/OutputSizeLimitTest.cpp| 1 +
 mlir/include/mlir/Bytecode/BytecodeWriter.h   | 1 +
 mlir/lib/Target/SPIRV/SPIRVBinaryUtils.cpp| 1 +
 mlir/unittests/Target/LLVM/SerializeNVVMTarget.cpp| 1 +
 polly/lib/Support/RegisterPasses.cpp  | 1 +
 59 files changed, 62 insertions(+), 6 deletions(-)

diff --git a/bolt/include/bolt/Core/BinaryBasicBlock.h 
b/bolt/include/bolt/Core/BinaryBasicBlock.h
index 9a9d7b8735d714..b4f31cf2bae6f6 100644
--- a/bolt/include/bolt/Core/BinaryBasicBlock.h
+++ 

[Lldb-commits] [clang] [clang-tools-extra] [lld] [lldb] [llvm] [mlir] [polly] [NFC] Add explicit #include llvm-config.h where its macros are used. (PR #106810)

2024-09-06 Thread Daniil Fukalov via lldb-commits

https://github.com/dfukalov updated 
https://github.com/llvm/llvm-project/pull/106810

>From 8232271806ea605fb4f7212d842a328307070003 Mon Sep 17 00:00:00 2001
From: dfukalov 
Date: Sat, 31 Aug 2024 01:45:27 +0200
Subject: [PATCH 1/3] [NFC] Add explicit #include llvm-config.h where its
 macros are used, part 2.

Without these explicit includes, removing other headers, who implicitly include 
llvm-config.h, may have non-trivial side effects.
For example, `clagd` may report even `llvm-config.h` as "no used" in case it 
defines a macro, that is expicitly used with #ifdef.
It is actually amplified with different build configs which use different set 
of macros.
---
 bolt/include/bolt/Core/BinaryBasicBlock.h | 1 +
 clang-tools-extra/clangd/Feature.cpp  | 1 +
 clang-tools-extra/clangd/unittests/ClangdTests.cpp| 1 +
 clang-tools-extra/clangd/unittests/CompileCommandsTests.cpp   | 1 +
 clang-tools-extra/clangd/unittests/SerializationTests.cpp | 1 +
 clang/include/clang/Interpreter/Value.h   | 1 +
 clang/lib/Driver/ToolChains/Cuda.cpp  | 1 +
 clang/lib/Driver/ToolChains/MinGW.cpp | 1 +
 clang/lib/Driver/ToolChains/WebAssembly.cpp   | 1 +
 clang/lib/Frontend/FrontendActions.cpp| 1 +
 clang/tools/driver/driver.cpp | 2 ++
 clang/unittests/Driver/GCCVersionTest.cpp | 1 +
 lld/ELF/OutputSections.cpp| 2 +-
 lldb/source/API/SBDebugger.cpp| 1 +
 lldb/source/Host/common/Host.cpp  | 1 +
 .../Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | 1 +
 .../Process/gdb-remote/GDBRemoteCommunicationClient.cpp   | 1 +
 lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp  | 1 +
 lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp  | 1 +
 lldb/unittests/Host/MainLoopTest.cpp  | 1 +
 llvm/include/llvm/Debuginfod/HTTPClient.h | 1 +
 llvm/include/llvm/Debuginfod/HTTPServer.h | 1 +
 llvm/include/llvm/Support/ErrorHandling.h | 1 +
 llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp| 1 +
 llvm/lib/Analysis/InlineAdvisor.cpp   | 1 +
 llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp | 1 +
 llvm/lib/Analysis/ModelUnderTrainingRunner.cpp| 1 +
 llvm/lib/Analysis/TFLiteUtils.cpp | 1 +
 llvm/lib/CodeGen/MLRegAllocEvictAdvisor.cpp   | 1 +
 llvm/lib/CodeGen/MLRegAllocPriorityAdvisor.cpp| 1 +
 llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp  | 1 +
 llvm/lib/CodeGen/RegAllocPriorityAdvisor.cpp  | 1 +
 llvm/lib/DebugInfo/PDB/PDB.cpp| 1 +
 llvm/lib/Debuginfod/HTTPClient.cpp| 1 +
 llvm/lib/Debuginfod/HTTPServer.cpp| 1 +
 llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp  | 1 +
 llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderVTune.cpp | 1 +
 llvm/lib/IR/Core.cpp  | 1 +
 llvm/lib/MC/SPIRVObjectWriter.cpp | 1 +
 llvm/lib/Support/CRC.cpp  | 1 +
 llvm/lib/Support/Compression.cpp  | 1 +
 llvm/lib/Support/Z3Solver.cpp | 1 +
 llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp | 1 +
 llvm/lib/TargetParser/Unix/Host.inc   | 1 +
 llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp| 1 +
 llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp| 1 +
 .../Analysis/InlineAdvisorPlugin/InlineAdvisorPlugin.cpp  | 4 ++--
 .../Analysis/InlineOrderPlugin/InlineOrderPlugin.cpp  | 4 ++--
 llvm/unittests/Analysis/PluginInlineAdvisorAnalysisTest.cpp   | 1 +
 llvm/unittests/Analysis/PluginInlineOrderAnalysisTest.cpp | 1 +
 llvm/unittests/Debuginfod/HTTPServerTests.cpp | 1 +
 llvm/unittests/Passes/Plugins/PluginsTest.cpp | 1 +
 llvm/unittests/Support/CompressionTest.cpp| 1 +
 llvm/unittests/TargetParser/Host.cpp  | 2 +-
 llvm/unittests/tools/llvm-profdata/OutputSizeLimitTest.cpp| 1 +
 mlir/include/mlir/Bytecode/BytecodeWriter.h   | 1 +
 mlir/lib/Target/SPIRV/SPIRVBinaryUtils.cpp| 1 +
 mlir/unittests/Target/LLVM/SerializeNVVMTarget.cpp| 1 +
 polly/lib/Support/RegisterPasses.cpp  | 1 +
 59 files changed, 62 insertions(+), 6 deletions(-)

diff --git a/bolt/include/bolt/Core/BinaryBasicBlock.h 
b/bolt/include/bolt/Core/BinaryBasicBlock.h
index 9a9d7b8735d714..b4f31cf2bae6f6 100644
--- a/bolt/include/bolt/Core/BinaryBasicBlock.h
+++ 

[Lldb-commits] [lldb] [NFC] Add explicit #include llvm-config.h where its macros are used, lldb part. (PR #107603)

2024-09-06 Thread Daniil Fukalov via lldb-commits

https://github.com/dfukalov created 
https://github.com/llvm/llvm-project/pull/107603

(this is lldb part)

Without these explicit includes, removing other headers, who implicitly include 
llvm-config.h, may have non-trivial side effects. For example, `clangd` may 
report even `llvm-config.h` as "no used" in case it defines a macro, that is 
explicitly used with #ifdef. It is actually amplified with different build 
configs which use different set of macros.

>From d0795cede77104fb3f9c1b58e89984a7e908ff7f Mon Sep 17 00:00:00 2001
From: dfukalov 
Date: Fri, 6 Sep 2024 17:59:04 +0200
Subject: [PATCH] [NFC] Add explicit #include llvm-config.h where its macros
 are used, lldb part.

(this is lldb part)

Without these explicit includes, removing other headers, who implicitly
include llvm-config.h, may have non-trivial side effects. For example,
`clangd` may report even `llvm-config.h` as "no used" in case it defines
a macro, that is explicitly used with #ifdef. It is actually amplified
with different build configs which use different set of macros.
---
 lldb/source/API/SBDebugger.cpp   | 1 +
 lldb/source/Host/common/Host.cpp | 1 +
 .../source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | 1 +
 .../Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp  | 1 +
 lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp | 1 +
 lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp | 1 +
 lldb/unittests/Host/MainLoopTest.cpp | 1 +
 7 files changed, 7 insertions(+)

diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp
index b21d7e67290073..6b72994fc96afb 100644
--- a/lldb/source/API/SBDebugger.cpp
+++ b/lldb/source/API/SBDebugger.cpp
@@ -57,6 +57,7 @@
 
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/StringRef.h"
+#include "llvm/Config/llvm-config.h" // for LLVM_ENABLE_CURL
 #include "llvm/Support/DynamicLibrary.h"
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/PrettyStackTrace.h"
diff --git a/lldb/source/Host/common/Host.cpp b/lldb/source/Host/common/Host.cpp
index a064c980d4454e..f08adea6546ae1 100644
--- a/lldb/source/Host/common/Host.cpp
+++ b/lldb/source/Host/common/Host.cpp
@@ -63,6 +63,7 @@
 #include "lldb/Utility/Status.h"
 #include "lldb/lldb-private-forward.h"
 #include "llvm/ADT/SmallString.h"
+#include "llvm/Config/llvm-config.h" // for LLVM_ON_UNIX
 #include "llvm/Support/Errno.h"
 #include "llvm/Support/FileSystem.h"
 
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp 
b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
index d49e7545827521..7eacd605362e7c 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
@@ -31,6 +31,7 @@
 #include "lldb/Utility/RegularExpression.h"
 #include "lldb/Utility/StreamString.h"
 #include "llvm/ADT/SmallString.h"
+#include "llvm/Config/llvm-config.h" // for LLVM_ENABLE_ZLIB
 #include "llvm/Support/ScopedPrinter.h"
 
 #include "ProcessGDBRemoteLog.h"
diff --git 
a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp 
b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index f6b1db7b8bbbc2..23baa97c1d 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -38,6 +38,7 @@
 
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/StringSwitch.h"
+#include "llvm/Config/llvm-config.h" // for LLVM_ENABLE_ZLIB
 #include "llvm/Support/JSON.h"
 
 #if defined(HAVE_LIBCOMPRESSION)
diff --git a/lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp 
b/lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp
index 386ba44c5ea653..bb738c3dcc54a0 100644
--- a/lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp
+++ b/lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp
@@ -28,6 +28,7 @@
 #include "lldb/Utility/StreamBuffer.h"
 #include "lldb/Utility/StreamString.h"
 #include "lldb/Utility/Timer.h"
+#include "llvm/Config/llvm-config.h" // for LLVM_ENABLE_ZLIB
 #include "llvm/Support/MemoryBuffer.h"
 
 #include "Plugins/ExpressionParser/Clang/ClangASTMetadata.h"
diff --git a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp 
b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
index 9a282acae91fbb..584c2115459c66 100644
--- a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
+++ b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
@@ -28,6 +28,7 @@
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/RegularExpression.h"
 
+#include "llvm/Config/llvm-config.h" // for LLVM_ENABLE_DIA_SDK
 #include "llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h"
 #include "llvm/DebugInfo/PDB/GenericError.h"
 #include "llvm/DebugInfo/PDB/IPDBDataStream.h"
diff --git a/lldb/unittests/Host/MainLoopTest.cpp 
b/lldb/unittests/Host/MainLoopTest.cpp
ind

[Lldb-commits] [lldb] [NFC] Add explicit #include llvm-config.h where its macros are used, lldb part. (PR #107603)

2024-09-06 Thread Daniil Fukalov via lldb-commits

https://github.com/dfukalov ready_for_review 
https://github.com/llvm/llvm-project/pull/107603
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [NFC] Add explicit #include llvm-config.h where its macros are used, lldb part. (PR #107603)

2024-09-09 Thread Daniil Fukalov via lldb-commits

https://github.com/dfukalov closed 
https://github.com/llvm/llvm-project/pull/107603
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [clang-tools-extra] [lld] [lldb] [llvm] [mlir] [polly] [NFC] Add explicit #include llvm-config.h where its macros are used. (PR #106810)

2024-09-16 Thread Daniil Fukalov via lldb-commits

dfukalov wrote:

Gentle ping...

https://github.com/llvm/llvm-project/pull/106810
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [clang-tools-extra] [lld] [lldb] [llvm] [mlir] [polly] [NFC] Add explicit #include llvm-config.h where its macros are used. (PR #106810)

2025-03-25 Thread Daniil Fukalov via lldb-commits

https://github.com/dfukalov closed 
https://github.com/llvm/llvm-project/pull/106810
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits