diff --git a/include/swift/Reflection/ReflectionContext.h b/include/swift/Reflection/ReflectionContext.h index 82c39157df7e6..059149eaa26e2 100644 --- a/include/swift/Reflection/ReflectionContext.h +++ b/include/swift/Reflection/ReflectionContext.h @@ -34,7 +34,6 @@ #include "swift/Runtime/Unreachable.h" #include -#include #include #include #include @@ -946,10 +945,12 @@ class ReflectionContext reinterpret_cast *>( HeaderBytes.get()); if (HeaderPtr == nullptr) { - std::stringstream stream; - stream << "unable to read Next pointer 0x" << std::hex - << BacktraceListNext.getAddressData(); - return stream.str(); + // FIXME: std::stringstream would be better, but LLVM's standard library + // introduces a vtable and we don't want that. + char result[128]; + std::snprintf(result, sizeof(result), "unable to read Next pointer %p", + BacktraceListNext.getAddressData()); + return std::string(result); } auto BacktraceAddrPtr = BacktraceListNext +