[Reproducers] Reinterpret cast to void*
authorJonas Devlieghere <jonas@devlieghere.com>
Mon, 11 Mar 2019 21:32:20 +0000 (21:32 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Mon, 11 Mar 2019 21:32:20 +0000 (21:32 +0000)
Apparently the log_append variant added in r355863 is considered
ambiguous. At this point I'm out of ideas so a good old reinterpret cast
will have to do. If anybody has a better idea I'd be happy to hear it.

llvm-svn: 355866

lldb/include/lldb/Utility/ReproducerInstrumentation.h

index eeb9ab0..61e4126 100644 (file)
@@ -34,12 +34,7 @@ inline void log_append(llvm::raw_string_ostream &ss, const T &t) {
 
 template <typename T>
 inline void log_append(llvm::raw_string_ostream &ss, const T *t) {
-  ss << t;
-}
-
-template <typename T, typename... E>
-inline void log_append(llvm::raw_string_ostream &ss, T (*t)(E...)) {
-  ss << &t;
+  ss << reinterpret_cast<const void *>(t);
 }
 
 template <>