[Legacy ThinLTO] NFC: Move helper class to an "Impl" namespace#112846
Merged
hubert-reinterpretcast merged 1 commit intomainfrom Oct 23, 2024
Merged
Conversation
Member
|
@llvm/pr-subscribers-lto Author: Hubert Tong (hubert-reinterpretcast) Changes
Full diff: https://github.com/llvm/llvm-project/pull/112846.diff 2 Files Affected:
diff --git a/llvm/include/llvm/LTO/legacy/ThinLTOCodeGenerator.h b/llvm/include/llvm/LTO/legacy/ThinLTOCodeGenerator.h
index 7eb30d56e10c10..676d4e179bed4b 100644
--- a/llvm/include/llvm/LTO/legacy/ThinLTOCodeGenerator.h
+++ b/llvm/include/llvm/LTO/legacy/ThinLTOCodeGenerator.h
@@ -31,8 +31,15 @@ namespace llvm {
class StringRef;
class TargetMachine;
+/// ThinLTOCodeGeneratorImpl - Namespace used for ThinLTOCodeGenerator
+/// implementation details. It should be considered private to the
+/// implementation.
+namespace ThinLTOCodeGeneratorImpl {
+struct TargetMachineBuilder;
+}
+
/// Helper to gather options relevant to the target machine creation
-struct TargetMachineBuilder {
+struct ThinLTOCodeGeneratorImpl::TargetMachineBuilder {
Triple TheTriple;
std::string MCpu;
std::string MAttr;
@@ -301,7 +308,7 @@ class ThinLTOCodeGenerator {
private:
/// Helper factory to build a TargetMachine
- TargetMachineBuilder TMBuilder;
+ ThinLTOCodeGeneratorImpl::TargetMachineBuilder TMBuilder;
/// Vector holding the in-memory buffer containing the produced binaries, when
/// SavedObjectsDirectoryPath isn't set.
diff --git a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
index 8074f8690cc1ce..311510ed9fabc2 100644
--- a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
+++ b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
@@ -70,6 +70,7 @@
#endif
using namespace llvm;
+using namespace ThinLTOCodeGeneratorImpl;
#define DEBUG_TYPE "thinlto"
|
`::llvm::TargetMachineBuilder` is only a helper class for `ThinLTOCodeGenerator` and not a real facility. Move it into an "Impl" namespace.
0061e5c to
30f67f3
Compare
w2yehia
approved these changes
Oct 18, 2024
Closed
NoumanAmir657
pushed a commit
to NoumanAmir657/llvm-project
that referenced
this pull request
Nov 4, 2024
…112846) `::llvm::TargetMachineBuilder` is only a helper class for `ThinLTOCodeGenerator` and not a real facility. Move it into an "Impl" namespace.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
::llvm::TargetMachineBuilderis only a helper class forThinLTOCodeGeneratorand not a real facility. Move it into an "Impl"namespace.