mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 00:24:26 +00:00
Revert "Introduce a string_ostream string builder facilty"
Temporarily back out commits r211749, r211752 and r211754. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211814 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -270,7 +270,8 @@ size_t LLVMDisasmInstruction(LLVMDisasmContextRef DCR, uint8_t *Bytes,
|
||||
const MCDisassembler *DisAsm = DC->getDisAsm();
|
||||
MCInstPrinter *IP = DC->getIP();
|
||||
MCDisassembler::DecodeStatus S;
|
||||
small_string_ostream<64> Annotations;
|
||||
SmallVector<char, 64> InsnStr;
|
||||
raw_svector_ostream Annotations(InsnStr);
|
||||
S = DisAsm->getInstruction(Inst, Size, MemoryObject, PC,
|
||||
/*REMOVE*/ nulls(), Annotations);
|
||||
switch (S) {
|
||||
@ -280,10 +281,13 @@ size_t LLVMDisasmInstruction(LLVMDisasmContextRef DCR, uint8_t *Bytes,
|
||||
return 0;
|
||||
|
||||
case MCDisassembler::Success: {
|
||||
Annotations.flush();
|
||||
StringRef AnnotationsStr = Annotations.str();
|
||||
|
||||
SmallVector<char, 64> InsnStr;
|
||||
raw_svector_ostream OS(InsnStr);
|
||||
formatted_raw_ostream FormattedOS(OS);
|
||||
IP->printInst(&Inst, FormattedOS, Annotations.str());
|
||||
IP->printInst(&Inst, FormattedOS, AnnotationsStr);
|
||||
|
||||
if (DC->getOptions() & LLVMDisassembler_Option_PrintLatency)
|
||||
emitLatency(DC, Inst);
|
||||
|
Reference in New Issue
Block a user