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

llvm-svn: 131837
This commit is contained in:
Chris Lattner 2011-05-22 04:53:24 +00:00
parent 0388fb0ee2
commit 1d068cc0b0
1 changed files with 2 additions and 2 deletions

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();