[llvm] b69fe48 - [IROutliner] Move global namespace cl::opt inside llvm::

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 30 01:13:00 PST 2021


Author: Fangrui Song
Date: 2021-12-30T01:12:55-08:00
New Revision: b69fe48ccf9ec19f6237ee2e9d16fc6a7071c17c

URL: https://github.com/llvm/llvm-project/commit/b69fe48ccf9ec19f6237ee2e9d16fc6a7071c17c
DIFF: https://github.com/llvm/llvm-project/commit/b69fe48ccf9ec19f6237ee2e9d16fc6a7071c17c.diff

LOG: [IROutliner] Move global namespace cl::opt inside llvm::

Added: 
    

Modified: 
    llvm/lib/Analysis/IRSimilarityIdentifier.cpp
    llvm/lib/Transforms/IPO/IROutliner.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Analysis/IRSimilarityIdentifier.cpp b/llvm/lib/Analysis/IRSimilarityIdentifier.cpp
index 2ec6cbeabda2b..ca1a2907e51cf 100644
--- a/llvm/lib/Analysis/IRSimilarityIdentifier.cpp
+++ b/llvm/lib/Analysis/IRSimilarityIdentifier.cpp
@@ -23,11 +23,13 @@
 using namespace llvm;
 using namespace IRSimilarity;
 
+namespace llvm {
 cl::opt<bool>
     DisableBranches("no-ir-sim-branch-matching", cl::init(false),
                     cl::ReallyHidden,
                     cl::desc("disable similarity matching, and outlining, "
                              "across branches for debugging purposes."));
+} // namespace llvm
 
 IRInstructionData::IRInstructionData(Instruction &I, bool Legality,
                                      IRInstructionDataList &IDList)

diff  --git a/llvm/lib/Transforms/IPO/IROutliner.cpp b/llvm/lib/Transforms/IPO/IROutliner.cpp
index b8a314c54f18c..928b12013a545 100644
--- a/llvm/lib/Transforms/IPO/IROutliner.cpp
+++ b/llvm/lib/Transforms/IPO/IROutliner.cpp
@@ -36,7 +36,9 @@ using namespace IRSimilarity;
 
 // A command flag to be used for debugging to exclude branches from similarity
 // matching and outlining.
+namespace llvm {
 extern cl::opt<bool> DisableBranches;
+} // namespace llvm
 
 // Set to true if the user wants the ir outliner to run on linkonceodr linkage
 // functions. This is false by default because the linker can dedupe linkonceodr


        


More information about the llvm-commits mailing list