[llvm] 5f759be - [LTO] Move cl::opt inside llvm:: after D53294
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 23 23:22:31 PST 2022
Author: Fangrui Song
Date: 2022-11-23T23:22:26-08:00
New Revision: 5f759beaae171d39c04040f6503244e2b7cd1138
URL: https://github.com/llvm/llvm-project/commit/5f759beaae171d39c04040f6503244e2b7cd1138
DIFF: https://github.com/llvm/llvm-project/commit/5f759beaae171d39c04040f6503244e2b7cd1138.diff
LOG: [LTO] Move cl::opt inside llvm:: after D53294
Added:
Modified:
llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h
llvm/lib/LTO/LTO.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h b/llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h
index 203f56d424a25..a55dc316a67e5 100644
--- a/llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h
+++ b/llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h
@@ -51,9 +51,6 @@
#include <string>
#include <vector>
-/// Enable global value internalization in LTO.
-extern llvm::cl::opt<bool> EnableLTOInternalization;
-
namespace llvm {
template <typename T> class ArrayRef;
class LLVMContext;
@@ -66,6 +63,9 @@ template <typename T> class ArrayRef;
class raw_ostream;
class raw_pwrite_stream;
+/// Enable global value internalization in LTO.
+extern cl::opt<bool> EnableLTOInternalization;
+
//===----------------------------------------------------------------------===//
/// C++ class which implements the opaque lto_code_gen_t type.
///
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp
index 81219cda35995..6e7fde62d6c52 100644
--- a/llvm/lib/LTO/LTO.cpp
+++ b/llvm/lib/LTO/LTO.cpp
@@ -69,10 +69,12 @@ static cl::opt<bool>
DumpThinCGSCCs("dump-thin-cg-sccs", cl::init(false), cl::Hidden,
cl::desc("Dump the SCCs in the ThinLTO index's callgraph"));
+namespace llvm {
/// Enable global value internalization in LTO.
cl::opt<bool> EnableLTOInternalization(
"enable-lto-internalization", cl::init(true), cl::Hidden,
cl::desc("Enable global value internalization in LTO"));
+}
// Computes a unique hash for the Module considering the current list of
// export/import and other global analysis results.
More information about the llvm-commits
mailing list