[clang-tools-extra] 6c0c280 - [include-cleaner] Include the reference type when printing the SymbolReference.
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 12 05:52:47 PST 2022
Author: Haojian Wu
Date: 2022-12-12T14:52:31+01:00
New Revision: 6c0c280b8ddcede2b78afe948c764cb04503f980
URL: https://github.com/llvm/llvm-project/commit/6c0c280b8ddcede2b78afe948c764cb04503f980
DIFF: https://github.com/llvm/llvm-project/commit/6c0c280b8ddcede2b78afe948c764cb04503f980.diff
LOG: [include-cleaner] Include the reference type when printing the SymbolReference.
This information is useful when printing the reference for debugging
purposes.
Differential Revision: https://reviews.llvm.org/D139835
Added:
Modified:
clang-tools-extra/include-cleaner/lib/Types.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/include-cleaner/lib/Types.cpp b/clang-tools-extra/include-cleaner/lib/Types.cpp
index 68907917ea640..68311546f724c 100644
--- a/clang-tools-extra/include-cleaner/lib/Types.cpp
+++ b/clang-tools-extra/include-cleaner/lib/Types.cpp
@@ -46,7 +46,7 @@ llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const Include &I) {
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.RT << " reference to " << R.Target << "@0x"
<< llvm::utohexstr(
R.RefLocation.getRawEncoding(), /*LowerCase=*/false,
/*Width=*/CHAR_BIT * sizeof(SourceLocation::UIntTy));
More information about the cfe-commits
mailing list