[llvm] 5fd80a0 - [MC] Move AsmMacroMaxNestingDepth inside llvm:: after D72680
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 23 23:14:01 PST 2022
Author: Fangrui Song
Date: 2022-11-23T23:13:55-08:00
New Revision: 5fd80a05510dde2aace7ebdcd1d3414ad9a8ed49
URL: https://github.com/llvm/llvm-project/commit/5fd80a05510dde2aace7ebdcd1d3414ad9a8ed49
DIFF: https://github.com/llvm/llvm-project/commit/5fd80a05510dde2aace7ebdcd1d3414ad9a8ed49.diff
LOG: [MC] Move AsmMacroMaxNestingDepth inside llvm:: after D72680
Added:
Modified:
llvm/lib/MC/MCParser/AsmParser.cpp
llvm/lib/MC/MCParser/MCAsmParser.cpp
llvm/lib/MC/MCParser/MasmParser.cpp
Removed:
################################################################################
diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp
index 240828f2a03c2..ce90c21a66ae8 100644
--- a/llvm/lib/MC/MCParser/AsmParser.cpp
+++ b/llvm/lib/MC/MCParser/AsmParser.cpp
@@ -74,8 +74,6 @@ using namespace llvm;
MCAsmParserSemaCallback::~MCAsmParserSemaCallback() = default;
-extern cl::opt<unsigned> AsmMacroMaxNestingDepth;
-
namespace {
/// Helper types for tracking macro definitions.
@@ -753,6 +751,8 @@ class HLASMAsmParser final : public AsmParser {
namespace llvm {
+extern cl::opt<unsigned> AsmMacroMaxNestingDepth;
+
extern MCAsmParserExtension *createDarwinAsmParser();
extern MCAsmParserExtension *createELFAsmParser();
extern MCAsmParserExtension *createCOFFAsmParser();
diff --git a/llvm/lib/MC/MCParser/MCAsmParser.cpp b/llvm/lib/MC/MCParser/MCAsmParser.cpp
index 7fc1dbf56f982..bfeba3108cb4b 100644
--- a/llvm/lib/MC/MCParser/MCAsmParser.cpp
+++ b/llvm/lib/MC/MCParser/MCAsmParser.cpp
@@ -21,9 +21,11 @@
using namespace llvm;
+namespace llvm {
cl::opt<unsigned> AsmMacroMaxNestingDepth(
"asm-macro-max-nesting-depth", cl::init(20), cl::Hidden,
cl::desc("The maximum nesting depth allowed for assembly macros."));
+}
MCAsmParser::MCAsmParser() = default;
diff --git a/llvm/lib/MC/MCParser/MasmParser.cpp b/llvm/lib/MC/MCParser/MasmParser.cpp
index 372538ce9929d..595d1f7f7bf3a 100644
--- a/llvm/lib/MC/MCParser/MasmParser.cpp
+++ b/llvm/lib/MC/MCParser/MasmParser.cpp
@@ -75,8 +75,6 @@
using namespace llvm;
-extern cl::opt<unsigned> AsmMacroMaxNestingDepth;
-
namespace {
/// Helper types for tracking macro definitions.
@@ -1082,6 +1080,8 @@ class MasmParser : public MCAsmParser {
namespace llvm {
+extern cl::opt<unsigned> AsmMacroMaxNestingDepth;
+
extern MCAsmParserExtension *createCOFFMasmParser();
} // end namespace llvm
More information about the llvm-commits
mailing list