llvm-mc: Switch MCInst to storing an MCExpr* instead of an MCValue.

Also, use MCInst::print instead of custom code in MCAsmPrinter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80575 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar
2009-08-31 08:08:38 +00:00
parent c18274ba9c
commit 8c2eebe407
10 changed files with 116 additions and 86 deletions

View File

@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
@ -23,9 +24,9 @@ void MCOperand::print(raw_ostream &OS) const {
else if (isMBBLabel())
OS << "MBB:(" << getMBBLabelFunction() << ","
<< getMBBLabelBlock() << ")";
else if (isMCValue()) {
OS << "Value:(";
getMCValue().print(OS);
else if (isExpr()) {
OS << "Expr:(";
getExpr()->print(OS);
OS << ")";
} else
OS << "UNDEFINED";