[PATCH] D139835: [include-cleaner] Include the reference type when printing the SymbolReference.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 12 04:49:40 PST 2022


hokein created this revision.
hokein added a reviewer: kadircet.
Herald added a project: All.
hokein requested review of this revision.
Herald added a project: clang-tools-extra.

This information is useful when printing the reference for debugging
purposes.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D139835

Files:
  clang-tools-extra/include-cleaner/lib/Types.cpp


Index: clang-tools-extra/include-cleaner/lib/Types.cpp
===================================================================
--- clang-tools-extra/include-cleaner/lib/Types.cpp
+++ clang-tools-extra/include-cleaner/lib/Types.cpp
@@ -46,7 +46,7 @@
 llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const SymbolReference &R) {
   // We can't decode the Location without SourceManager. Its raw representation
   // isn't completely useless (and distinguishes SymbolReference from Symbol).
-  return OS << R.Target << "@0x"
+  return OS << R.Target << "@" << R.RT << "@0x"
             << llvm::utohexstr(
                    R.RefLocation.getRawEncoding(), /*LowerCase=*/false,
                    /*Width=*/CHAR_BIT * sizeof(SourceLocation::UIntTy));


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139835.482077.patch
Type: text/x-patch
Size: 751 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221212/52fe3b09/attachment.bin>


More information about the cfe-commits mailing list