projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8e9baa9
)
[clang][Interp][NFC] Simplify dump() indentation
author
Timm Bäder
<tbaeder@redhat.com>
Wed, 31 May 2023 06:50:38 +0000
(08:50 +0200)
committer
Timm Bäder
<tbaeder@redhat.com>
Wed, 31 May 2023 07:01:57 +0000
(09:01 +0200)
Use llvm::raw_ostream::indent().
clang/lib/AST/Interp/Disasm.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/AST/Interp/Disasm.cpp
b/clang/lib/AST/Interp/Disasm.cpp
index
7a5da90
..
f4a6cb8
100644
(file)
--- a/
clang/lib/AST/Interp/Disasm.cpp
+++ b/
clang/lib/AST/Interp/Disasm.cpp
@@
-42,9
+42,7
@@
LLVM_DUMP_METHOD void Function::dump(llvm::raw_ostream &OS) const {
auto PrintName = [&OS](const char *Name) {
OS << Name;
- for (long I = 0, N = strlen(Name); I < 30 - N; ++I) {
- OS << ' ';
- }
+ OS.indent(std::max(30l - strlen(Name), 0ul));
};
for (CodePtr Start = getCodeBegin(), PC = Start; PC != getCodeEnd();) {