From 8f019b2aa3bee0d8f716c24568b7bb84bb37b05a Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Sat, 8 Aug 2015 00:41:51 +0000 Subject: [PATCH] AMDGPU: Implement AMDGPUOperand::print() git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244381 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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, -- 2.34.1