[Lldb-commits] [lldb] 9eaf0ab - Revert "[lldb/Utility] Provide a stringify_append overload for function pointers."

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 16 17:52:15 PDT 2020


Author: Jonas Devlieghere
Date: 2020-04-16T17:52:09-07:00
New Revision: 9eaf0abebff9c61fa01c6ca69cbc74b1464efe14

URL: https://github.com/llvm/llvm-project/commit/9eaf0abebff9c61fa01c6ca69cbc74b1464efe14
DIFF: https://github.com/llvm/llvm-project/commit/9eaf0abebff9c61fa01c6ca69cbc74b1464efe14.diff

LOG: Revert "[lldb/Utility] Provide a stringify_append overload for function pointers."

Temporarily reverts commit d10386e1779599d217b5b849a079f29dfbe17024
because it breaks the Windows build. MSVC complains about an ambiguous
call to an overloaded function.

Added: 
    

Modified: 
    lldb/include/lldb/Utility/ReproducerInstrumentation.h

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/Utility/ReproducerInstrumentation.h b/lldb/include/lldb/Utility/ReproducerInstrumentation.h
index 75f38929e362..3b5dde3d2e2a 100644
--- a/lldb/include/lldb/Utility/ReproducerInstrumentation.h
+++ b/lldb/include/lldb/Utility/ReproducerInstrumentation.h
@@ -34,17 +34,12 @@ inline void stringify_append(llvm::raw_string_ostream &ss, const T &t) {
 
 template <typename T>
 inline void stringify_append(llvm::raw_string_ostream &ss, T *t) {
-  ss << static_cast<void *>(t);
+  ss << reinterpret_cast<void *>(t);
 }
 
 template <typename T>
 inline void stringify_append(llvm::raw_string_ostream &ss, const T *t) {
-  ss << static_cast<const void *>(t);
-}
-
-template <typename T, typename... Args>
-inline void stringify_append(llvm::raw_string_ostream &ss, T (*t)(Args...)) {
-  ss << "function pointer";
+  ss << reinterpret_cast<const void *>(t);
 }
 
 template <>


        


More information about the lldb-commits mailing list