Skip to content

Commit 450d448

Browse files
committed
[NFC][LLVM] Fix some llvm namespace usage in Bitcode writer
1 parent 52c2e45 commit 450d448

File tree

4 files changed

+4
-10
lines changed

4 files changed

+4
-10
lines changed

llvm/include/llvm/Analysis/ModuleSummaryAnalysis.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ createImmutableModuleSummaryIndexWrapperPass(const ModuleSummaryIndex *Index);
103103
/// consistency between summary analysis and the ThinLTO backend processing.
104104
bool mayHaveMemprofSummary(const CallBase *CB);
105105

106+
extern FunctionSummary::ForceSummaryHotnessType ForceSummaryEdgesCold;
107+
106108
} // end namespace llvm
107109

108110
#endif // LLVM_ANALYSIS_MODULESUMMARYANALYSIS_H

llvm/lib/Analysis/ModuleSummaryAnalysis.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,8 @@ using namespace llvm::memprof;
6363

6464
// Option to force edges cold which will block importing when the
6565
// -import-cold-multiplier is set to 0. Useful for debugging.
66-
namespace llvm {
67-
FunctionSummary::ForceSummaryHotnessType ForceSummaryEdgesCold =
66+
FunctionSummary::ForceSummaryHotnessType llvm::ForceSummaryEdgesCold =
6867
FunctionSummary::FSHT_None;
69-
} // namespace llvm
7068

7169
static cl::opt<FunctionSummary::ForceSummaryHotnessType, true> FSEC(
7270
"force-summary-edges-cold", cl::Hidden, cl::location(ForceSummaryEdgesCold),

llvm/lib/Bitcode/Reader/MetadataLoader.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@
6060
#include <type_traits>
6161
#include <utility>
6262
#include <vector>
63-
namespace llvm {
64-
class Argument;
65-
}
6663

6764
using namespace llvm;
6865

llvm/lib/Bitcode/Writer/BitcodeWriter.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "llvm/ADT/SmallVector.h"
2424
#include "llvm/ADT/StringMap.h"
2525
#include "llvm/ADT/StringRef.h"
26+
#include "llvm/Analysis/ModuleSummaryAnalysis.h"
2627
#include "llvm/BinaryFormat/Dwarf.h"
2728
#include "llvm/Bitcode/BitcodeCommon.h"
2829
#include "llvm/Bitcode/BitcodeReader.h"
@@ -117,10 +118,6 @@ static cl::opt<bool>
117118
#endif
118119
cl::desc(""));
119120

120-
namespace llvm {
121-
extern FunctionSummary::ForceSummaryHotnessType ForceSummaryEdgesCold;
122-
}
123-
124121
extern llvm::cl::opt<bool> UseNewDbgInfoFormat;
125122

126123
namespace {

0 commit comments

Comments
 (0)