From 5f759beaae171d39c04040f6503244e2b7cd1138 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 23 Nov 2022 23:22:26 -0800 Subject: [PATCH] [LTO] Move cl::opt inside llvm:: after D53294 --- llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h | 6 +++--- llvm/lib/LTO/LTO.cpp | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h b/llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h index 203f56d..a55dc31 100644 --- a/llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h +++ b/llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h @@ -51,9 +51,6 @@ #include #include -/// Enable global value internalization in LTO. -extern llvm::cl::opt EnableLTOInternalization; - namespace llvm { template class ArrayRef; class LLVMContext; @@ -66,6 +63,9 @@ template class ArrayRef; class raw_ostream; class raw_pwrite_stream; +/// Enable global value internalization in LTO. +extern cl::opt 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 81219cd..6e7fde6 100644 --- a/llvm/lib/LTO/LTO.cpp +++ b/llvm/lib/LTO/LTO.cpp @@ -69,10 +69,12 @@ static cl::opt 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 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. -- 2.7.4