AMDGPU: Fix crash when dumping unknown opcode

I'm for some reason having a problem producing a test.
It should be the same as test/MC/X86/invalid_opcode.s,
but llvm-mc seems to ignore random bytes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267225 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Matt Arsenault 2016-04-22 21:23:41 +00:00
parent 74eabdd998
commit f8d640b67e

View File

@ -405,6 +405,11 @@ public:
raw_ostream &OS,
StringRef Annot,
MCSubtargetInfo const &STI) override {
if (!MI) {
OS << " <unknown>";
return;
}
SmallString<40> InstStr;
raw_svector_ostream IS(InstStr);