Skip to content

Commit

Permalink
llvm-dwarfdump: Pretty printing types including a space between const…
Browse files Browse the repository at this point in the history
… and parenthesized references/pointers to arrays
  • Loading branch information
dwblaikie committed Sep 19, 2021
1 parent 391fa37 commit 372e2c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,10 @@ struct DWARFTypePrinter {

void appendPointerLikeTypeBefore(DWARFDie D, DWARFDie Inner, StringRef Ptr) {
appendUnqualifiedNameBefore(Inner);
if (Word)
OS << ' ';
if (needsParens(Inner))
OS << '(';
else if (Word)
OS << ' ';
OS << Ptr;
Word = false;
}
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/llvm-dwarfdump/X86/prettyprint_types.s
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
# const reference to a pointer to member function (with const, volatile, rvalue ref qualifiers)
# CHECK: DW_AT_type{{.*}}"void (foo::*const &)() const volatile &&")

# CHECK: DW_AT_type{{.*}}"int *const(&)[1]")
# CHECK: DW_AT_type{{.*}}"int *const (&)[1]")
# CHECK: DW_AT_type{{.*}}"int *const[1]")
# CHECK: DW_AT_type{{.*}}"const int (&)[1]")
# CHECK: DW_AT_type{{.*}}"const int [1]")
Expand Down

0 comments on commit 372e2c2

Please sign in to comment.