Skip to content

Commit 4350b92

Browse files
committed
[llvm] fix extern cl::opt definitions for DLL export
1 parent 3782eb6 commit 4350b92

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

clang/lib/CodeGen/BackendUtil.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#include "llvm/ProfileData/InstrProfCorrelator.h"
4444
#include "llvm/Support/BuryPointer.h"
4545
#include "llvm/Support/CommandLine.h"
46+
#include "llvm/Support/Compiler.h"
4647
#include "llvm/Support/MemoryBuffer.h"
4748
#include "llvm/Support/PrettyStackTrace.h"
4849
#include "llvm/Support/Program.h"
@@ -96,8 +97,6 @@ using namespace llvm;
9697
#include "llvm/Support/Extension.def"
9798

9899
namespace llvm {
99-
extern cl::opt<bool> PrintPipelinePasses;
100-
101100
// Experiment to move sanitizers earlier.
102101
static cl::opt<bool> ClSanitizeOnOptimizerEarlyEP(
103102
"sanitizer-early-opt-ep", cl::Optional,
@@ -118,7 +117,8 @@ static cl::opt<PGOOptions::ColdFuncOpt> ClPGOColdFuncAttr(
118117
clEnumValN(PGOOptions::ColdFuncOpt::OptNone, "optnone",
119118
"Mark cold functions with optnone.")));
120119

121-
extern cl::opt<InstrProfCorrelator::ProfCorrelatorKind> ProfileCorrelate;
120+
LLVM_ABI extern cl::opt<InstrProfCorrelator::ProfCorrelatorKind>
121+
ProfileCorrelate;
122122
} // namespace llvm
123123
namespace clang {
124124
extern llvm::cl::opt<bool> ClSanitizeGuardChecks;

flang/lib/Frontend/FrontendActions.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@
7474
#include <memory>
7575
#include <system_error>
7676

77-
namespace llvm {
78-
extern cl::opt<bool> PrintPipelinePasses;
79-
} // namespace llvm
80-
8177
using namespace Fortran::frontend;
8278

8379
constexpr llvm::StringLiteral timingIdParse = "Parse";

llvm/tools/llvm-profgen/ProfileGenerator.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,6 @@ using namespace llvm;
108108
using namespace sampleprof;
109109

110110
namespace llvm {
111-
extern cl::opt<int> ProfileSummaryCutoffHot;
112-
extern cl::opt<bool> UseContextLessSummary;
113111

114112
namespace sampleprof {
115113

0 commit comments

Comments
 (0)