Fix modules build of AVRAsmParser.cpp
Summary:
Without this change I get the following error:
lib/Target/AVR/AVRGenAsmMatcher.inc:1135:1: error: redundant #include of module 'LLVM_Utils.Support.Format' appears within namespace 'llvm' [-Wmodules-import-nested-redundant]
Reviewers: dylanmckay
Reviewed By: dylanmckay
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D53425
llvm-svn: 346750
diff --git a/llvm/lib/Target/AVR/AsmParser/AVRAsmParser.cpp b/llvm/lib/Target/AVR/AsmParser/AVRAsmParser.cpp
index d57cc09..261acdc 100644
--- a/llvm/lib/Target/AVR/AsmParser/AVRAsmParser.cpp
+++ b/llvm/lib/Target/AVR/AsmParser/AVRAsmParser.cpp
@@ -34,8 +34,9 @@
#define DEBUG_TYPE "avr-asm-parser"
-namespace llvm {
+using namespace llvm;
+namespace {
/// Parses AVR assembly from a stream.
class AVRAsmParser : public MCTargetAsmParser {
const MCSubtargetInfo &STI;
@@ -245,6 +246,8 @@
}
};
+} // end anonymous namespace.
+
// Auto-generated Match Functions
/// Maps from the set of all register names to a register number.
@@ -708,5 +711,3 @@
}
return Match_InvalidOperand;
}
-
-} // end of namespace llvm