Skip to content

Commit 30f67f3

Browse files
[Legacy ThinLTO] NFC: Move helper class to an "Impl" namespace
`::llvm::TargetMachineBuilder` is only a helper class for `ThinLTOCodeGenerator` and not a real facility. Move it into an "Impl" namespace.
1 parent 7be4ab0 commit 30f67f3

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

llvm/include/llvm/LTO/legacy/ThinLTOCodeGenerator.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,15 @@ namespace llvm {
3131
class StringRef;
3232
class TargetMachine;
3333

34+
/// ThinLTOCodeGeneratorImpl - Namespace used for ThinLTOCodeGenerator
35+
/// implementation details. It should be considered private to the
36+
/// implementation.
37+
namespace ThinLTOCodeGeneratorImpl {
38+
struct TargetMachineBuilder;
39+
}
40+
3441
/// Helper to gather options relevant to the target machine creation
35-
struct TargetMachineBuilder {
42+
struct ThinLTOCodeGeneratorImpl::TargetMachineBuilder {
3643
Triple TheTriple;
3744
std::string MCpu;
3845
std::string MAttr;
@@ -301,7 +308,7 @@ class ThinLTOCodeGenerator {
301308

302309
private:
303310
/// Helper factory to build a TargetMachine
304-
TargetMachineBuilder TMBuilder;
311+
ThinLTOCodeGeneratorImpl::TargetMachineBuilder TMBuilder;
305312

306313
/// Vector holding the in-memory buffer containing the produced binaries, when
307314
/// SavedObjectsDirectoryPath isn't set.

llvm/lib/LTO/ThinLTOCodeGenerator.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
#endif
7171

7272
using namespace llvm;
73+
using namespace ThinLTOCodeGeneratorImpl;
7374

7475
#define DEBUG_TYPE "thinlto"
7576

0 commit comments

Comments
 (0)