diff options
author | Chris Lattner <sabre@nondot.org> | 2011-05-22 04:53:24 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-05-22 04:53:24 +0000 |
commit | 9063b55f9b51850fa5f77abc699ab53ec639d9be (patch) | |
tree | d68d461bcf7253be79171b8d52ad60ee2f58a251 /lib/MC/MCDisassembler | |
parent | 97ff42d51dc9e4ec8c4a6c2439b230bba1877553 (diff) | |
download | external_llvm-9063b55f9b51850fa5f77abc699ab53ec639d9be.zip external_llvm-9063b55f9b51850fa5f77abc699ab53ec639d9be.tar.gz external_llvm-9063b55f9b51850fa5f77abc699ab53ec639d9be.tar.bz2 |
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
Diffstat (limited to 'lib/MC/MCDisassembler')
-rw-r--r-- | lib/MC/MCDisassembler/Disassembler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/MC/MCDisassembler/Disassembler.cpp b/lib/MC/MCDisassembler/Disassembler.cpp index 29fc192..6e636f0 100644 --- a/lib/MC/MCDisassembler/Disassembler.cpp +++ b/lib/MC/MCDisassembler/Disassembler.cpp @@ -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(); |