[PATCH] D146492: Add new printNumber() for size_t

Junhee Yoo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 20 19:31:20 PDT 2023


junhee-yoo created this revision.
Herald added a project: All.
junhee-yoo requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

after https://reviews.llvm.org/D137096, I faced compile error:

> error: call to member function 'printNumber' is ambiguous

which was occurred by absent of "printNumber(StringRef Label, size_t Value)".


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146492

Files:
  llvm/include/llvm/Support/ScopedPrinter.h


Index: llvm/include/llvm/Support/ScopedPrinter.h
===================================================================
--- llvm/include/llvm/Support/ScopedPrinter.h
+++ llvm/include/llvm/Support/ScopedPrinter.h
@@ -198,6 +198,10 @@
     printFlagsImpl(Label, hex(Value), SetFlags);
   }
 
+  virtual void printNumber(StringRef Label, size_t Value) {
+    startLine() << Label << ": " << Value << "\n";
+  }
+
   virtual void printNumber(StringRef Label, uint64_t Value) {
     startLine() << Label << ": " << Value << "\n";
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146492.506816.patch
Type: text/x-patch
Size: 527 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230321/b2ab2cc5/attachment.bin>


More information about the llvm-commits mailing list