switch to using a smallvector to avoid allocations for most normal size instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131837 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2011-05-22 04:53:24 +00:00
parent 97ff42d51d
commit 9063b55f9b

View File

@ -147,8 +147,8 @@ size_t LLVMDisasmInstruction(LLVMDisasmContextRef DCR, uint8_t *Bytes,
if (!DisAsm->getInstruction(Inst, Size, MemoryObject, PC, /*REMOVE*/ nulls()))
return 0;
std::string InsnStr;
raw_string_ostream OS(InsnStr);
SmallVector<char, 64> InsnStr;
raw_svector_ostream OS(InsnStr);
IP->printInst(&Inst, OS);
OS.flush();