From: Matt Arsenault Date: Sat, 8 Aug 2015 00:41:51 +0000 (+0000) Subject: AMDGPU: Implement AMDGPUOperand::print() X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cbd753761a76b1ba50866971be61739dfdffe1bf;p=platform%2Fupstream%2Fllvm.git AMDGPU: Implement AMDGPUOperand::print() llvm-svn: 244381 --- diff --git a/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp b/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp index 0ea3d1e..df6f396 100644 --- a/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp +++ b/llvm/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,