switch to using a smallvector to avoid allocations for most normal size instructions.
llvm-svn: 131837
This commit is contained in:
parent
0388fb0ee2
commit
1d068cc0b0
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue