aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/TableGen/X86DisassemblerTables.cpp
diff options
context:
space:
mode:
authorYoungsuk Kim <youngsuk.kim@hpe.com>2024-07-05 16:36:19 -0500
committerYoungsuk Kim <youngsuk.kim@hpe.com>2024-07-05 17:22:03 -0500
commit34855405b0a7dd6719fa3278f9b888f7f11bc4d8 (patch)
treea50a20f8ede8cf68f4972d163cbb638d712970a5 /llvm/utils/TableGen/X86DisassemblerTables.cpp
parentdc1da93958be0311b79dce39d71bd954c478cf19 (diff)
downloadllvm-34855405b0a7dd6719fa3278f9b888f7f11bc4d8.zip
llvm-34855405b0a7dd6719fa3278f9b888f7f11bc4d8.tar.gz
llvm-34855405b0a7dd6719fa3278f9b888f7f11bc4d8.tar.bz2
[llvm] Avoid 'raw_string_ostream::str' (NFC)
Since `raw_string_ostream` doesn't own the string buffer, it is desirable (in terms of memory safety) for users to directly reference the string buffer rather than use `raw_string_ostream::str()`. Work towards TODO item to remove `raw_string_ostream::str()`.
Diffstat (limited to 'llvm/utils/TableGen/X86DisassemblerTables.cpp')
-rw-r--r--llvm/utils/TableGen/X86DisassemblerTables.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/X86DisassemblerTables.cpp b/llvm/utils/TableGen/X86DisassemblerTables.cpp
index f4d282f..7d28c48 100644
--- a/llvm/utils/TableGen/X86DisassemblerTables.cpp
+++ b/llvm/utils/TableGen/X86DisassemblerTables.cpp
@@ -1062,11 +1062,11 @@ void DisassemblerTables::emit(raw_ostream &o) const {
i1--;
emitContextDecisions(o1, o2, i1, i2, ModRMTableNum);
- o << o1.str();
+ o << s1;
o << " 0x0\n";
o << "};\n";
o << "\n";
- o << o2.str();
+ o << s2;
o << "\n";
o << "\n";
}