diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index 7e0a3cf5591ce..97bc063ad34e5 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -43,6 +43,7 @@ #include "llvm/ProfileData/InstrProfCorrelator.h" #include "llvm/Support/BuryPointer.h" #include "llvm/Support/CommandLine.h" +#include "llvm/Support/Compiler.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/PrettyStackTrace.h" #include "llvm/Support/Program.h" @@ -96,8 +97,6 @@ using namespace llvm; #include "llvm/Support/Extension.def" namespace llvm { -extern cl::opt PrintPipelinePasses; - // Experiment to move sanitizers earlier. static cl::opt ClSanitizeOnOptimizerEarlyEP( "sanitizer-early-opt-ep", cl::Optional, @@ -118,7 +117,8 @@ static cl::opt ClPGOColdFuncAttr( clEnumValN(PGOOptions::ColdFuncOpt::OptNone, "optnone", "Mark cold functions with optnone."))); -extern cl::opt ProfileCorrelate; +LLVM_ABI extern cl::opt + ProfileCorrelate; } // namespace llvm namespace clang { extern llvm::cl::opt ClSanitizeGuardChecks; diff --git a/flang/lib/Frontend/FrontendActions.cpp b/flang/lib/Frontend/FrontendActions.cpp index d684eeb696755..bf15def3f3b2e 100644 --- a/flang/lib/Frontend/FrontendActions.cpp +++ b/flang/lib/Frontend/FrontendActions.cpp @@ -74,10 +74,6 @@ #include #include -namespace llvm { -extern cl::opt PrintPipelinePasses; -} // namespace llvm - using namespace Fortran::frontend; constexpr llvm::StringLiteral timingIdParse = "Parse"; diff --git a/llvm/tools/llvm-profgen/ProfileGenerator.cpp b/llvm/tools/llvm-profgen/ProfileGenerator.cpp index b47c77c5f2ff3..db686c3b597eb 100644 --- a/llvm/tools/llvm-profgen/ProfileGenerator.cpp +++ b/llvm/tools/llvm-profgen/ProfileGenerator.cpp @@ -108,8 +108,6 @@ using namespace llvm; using namespace sampleprof; namespace llvm { -extern cl::opt ProfileSummaryCutoffHot; -extern cl::opt UseContextLessSummary; namespace sampleprof {