mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
6d3bfb1d63
AsmToken is in the MCParser library, so we can't use its dump function from MCAsmMacro in the MC library. Instead, just print the string, which we don't need the MCParser library for. llvm-svn: 326810
43 lines
1.0 KiB
C++
43 lines
1.0 KiB
C++
//===- MCAsmMacro.h - Assembly Macros ---------------------------*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm/MC/MCAsmMacro.h"
|
|
#include "llvm/Support/raw_ostream.h"
|
|
|
|
using namespace llvm;
|
|
|
|
void MCAsmMacroParameter::dump(raw_ostream &OS) const {
|
|
OS << "\"" << Name << "\"";
|
|
if (Required)
|
|
OS << ":req";
|
|
if (Vararg)
|
|
OS << ":vararg";
|
|
if (!Value.empty()) {
|
|
OS << " = ";
|
|
bool first = true;
|
|
for (const AsmToken &T : Value) {
|
|
if (!first)
|
|
OS << ", ";
|
|
first = false;
|
|
OS << T.getString();
|
|
}
|
|
}
|
|
OS << "\n";
|
|
}
|
|
|
|
void MCAsmMacro::dump(raw_ostream &OS) const {
|
|
OS << "Macro " << Name << ":\n";
|
|
OS << " Parameters:\n";
|
|
for (const MCAsmMacroParameter &P : Parameters) {
|
|
OS << " ";
|
|
P.dump();
|
|
}
|
|
OS << " (BEGIN BODY)" << Body << "(END BODY)\n";
|
|
}
|