From: Matt Arsenault Date: Sat, 8 Aug 2015 00:41:51 +0000 (+0000) Subject: AMDGPU: Implement AMDGPUOperand::print() X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8f019b2aa3bee0d8f716c24568b7bb84bb37b05a;p=oota-llvm.git AMDGPU: Implement AMDGPUOperand::print() git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244381 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp b/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp index 0ea3d1e7152..df6f396a403 100644 --- a/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp +++ b/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp @@ -251,7 +251,22 @@ public: return EndLoc; } - void print(raw_ostream &OS) const override { } + void print(raw_ostream &OS) const override { + switch (Kind) { + case Register: + OS << "'; + break; + case Immediate: + OS << getImm(); + break; + case Token: + OS << '\'' << getToken() << '\''; + break; + case Expression: + OS << "'; + break; + } + } static std::unique_ptr CreateImm(int64_t Val, SMLoc Loc, enum ImmTy Type = ImmTyNone,