Loading...
mach_o/Error.cpp dyld-1122.1 dyld-1162
--- dyld/dyld-1122.1/mach_o/Error.cpp
+++ dyld/dyld-1162/mach_o/Error.cpp
@@ -51,6 +51,14 @@
     _buffer = other._buffer;
     other._buffer = nullptr;
     return *this;
+}
+
+
+Error Error::copy(const Error& other)
+{
+    if ( other.noError() )
+        return Error::none();
+    return Error("%s", other.message());
 }
 
 Error::~Error()
@@ -109,4 +117,23 @@
 #endif
 }
 
+void Error::append(const char* format, ...)
+{
+#if TARGET_OS_EXCLAVEKIT
+   size_t len = strlen(_strBuf);
+   va_list list;
+   va_start(list, format);
+   vsnprintf(&_strBuf[len], sizeof(_strBuf)-len, format, list);
+   va_end(list);
+#else
+    assert(_buffer != nullptr);
+    _simple_sresize(_buffer);   // move insertion point to end of existing string in buffer
+    va_list list;
+    va_start(list, format);
+    _simple_vsprintf(_buffer, format, list);
+    va_end(list);
+#endif
+}
+
+
 } // namespace mach_o