diff options
| author | Raphael Isemann <teemperor@gmail.com> | 2019-12-04 08:27:43 +0100 |
|---|---|---|
| committer | Raphael Isemann <teemperor@gmail.com> | 2019-12-04 08:28:52 +0100 |
| commit | 2f1e7b3d01e176e912477d52847c19d3847a43a0 (patch) | |
| tree | 4c68da95751a0096b2d19ec72e57d40dbfa1ea3b /lldb/source/Utility | |
| parent | ddcce0f3d665b66a8232a80ca918d349c8485fe4 (diff) | |
| download | bcm5719-llvm-2f1e7b3d01e176e912477d52847c19d3847a43a0.tar.gz bcm5719-llvm-2f1e7b3d01e176e912477d52847c19d3847a43a0.zip | |
[lldb][NFC] Migrate to raw_ostream in ArchSpec::DumpTriple
Reviewers: labath, davide
Reviewed By: davide
Subscribers: clayborg, JDevlieghere, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D70979
Diffstat (limited to 'lldb/source/Utility')
| -rw-r--r-- | lldb/source/Utility/ArchSpec.cpp | 10 | ||||
| -rw-r--r-- | lldb/source/Utility/ProcessInfo.cpp | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/lldb/source/Utility/ArchSpec.cpp b/lldb/source/Utility/ArchSpec.cpp index 38f6752b034..2bebecb2c67 100644 --- a/lldb/source/Utility/ArchSpec.cpp +++ b/lldb/source/Utility/ArchSpec.cpp @@ -1450,17 +1450,17 @@ bool ArchSpec::IsAlwaysThumbInstructions() const { return false; } -void ArchSpec::DumpTriple(Stream &s) const { +void ArchSpec::DumpTriple(llvm::raw_ostream &s) const { const llvm::Triple &triple = GetTriple(); llvm::StringRef arch_str = triple.getArchName(); llvm::StringRef vendor_str = triple.getVendorName(); llvm::StringRef os_str = triple.getOSName(); llvm::StringRef environ_str = triple.getEnvironmentName(); - s.Printf("%s-%s-%s", arch_str.empty() ? "*" : arch_str.str().c_str(), - vendor_str.empty() ? "*" : vendor_str.str().c_str(), - os_str.empty() ? "*" : os_str.str().c_str()); + s << llvm::formatv("{0}-{1}-{2}", arch_str.empty() ? "*" : arch_str, + vendor_str.empty() ? "*" : vendor_str, + os_str.empty() ? "*" : os_str); if (!environ_str.empty()) - s.Printf("-%s", environ_str.str().c_str()); + s << "-" << environ_str; } diff --git a/lldb/source/Utility/ProcessInfo.cpp b/lldb/source/Utility/ProcessInfo.cpp index 5743d223be4..a02ee1af867 100644 --- a/lldb/source/Utility/ProcessInfo.cpp +++ b/lldb/source/Utility/ProcessInfo.cpp @@ -49,7 +49,7 @@ llvm::StringRef ProcessInfo::GetNameAsStringRef() const { void ProcessInfo::Dump(Stream &s, Platform *platform) const { s << "Executable: " << GetName() << "\n"; s << "Triple: "; - m_arch.DumpTriple(s); + m_arch.DumpTriple(s.AsRawOstream()); s << "\n"; s << "Arguments:\n"; @@ -137,7 +137,7 @@ void ProcessInstanceInfo::Dump(Stream &s, UserIDResolver &resolver) const { if (m_arch.IsValid()) { s.Printf(" arch = "); - m_arch.DumpTriple(s); + m_arch.DumpTriple(s.AsRawOstream()); s.EOL(); } @@ -189,7 +189,7 @@ void ProcessInstanceInfo::DumpAsTableRow(Stream &s, UserIDResolver &resolver, StreamString arch_strm; if (m_arch.IsValid()) - m_arch.DumpTriple(arch_strm); + m_arch.DumpTriple(arch_strm.AsRawOstream()); auto print = [&](bool (ProcessInstanceInfo::*isValid)() const, uint32_t (ProcessInstanceInfo::*getID)() const, |

