Revert " [LoongArch][ISel] Check the number of sign bits in `PatGprGpr_32` (#107432)"
[llvm-project.git] / llvm / lib / MC / MCAsmMacro.cpp
blobbc95f98f295700d197cdb454ee6ba51b4cd23464
1 //===- MCAsmMacro.h - Assembly Macros ---------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "llvm/MC/MCAsmMacro.h"
10 #include "llvm/Support/raw_ostream.h"
12 using namespace llvm;
14 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
15 void MCAsmMacroParameter::dump(raw_ostream &OS) const {
16 OS << "\"" << Name << "\"";
17 if (Required)
18 OS << ":req";
19 if (Vararg)
20 OS << ":vararg";
21 if (!Value.empty()) {
22 OS << " = ";
23 bool first = true;
24 for (const AsmToken &T : Value) {
25 if (!first)
26 OS << ", ";
27 first = false;
28 OS << T.getString();
31 OS << "\n";
34 void MCAsmMacro::dump(raw_ostream &OS) const {
35 OS << "Macro " << Name << ":\n";
36 OS << " Parameters:\n";
37 for (const MCAsmMacroParameter &P : Parameters) {
38 OS << " ";
39 P.dump();
41 if (!Locals.empty()) {
42 OS << " Locals:\n";
43 for (StringRef L : Locals)
44 OS << " " << L << '\n';
46 OS << " (BEGIN BODY)" << Body << "(END BODY)\n";
48 #endif