chromium/v8/src/wasm/string-builder.h

// Copyright 2022 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#if !V8_ENABLE_WEBASSEMBLY
#error This header should only be included if WebAssembly is enabled.
#endif  // !V8_ENABLE_WEBASSEMBLY

#ifndef V8_WASM_STRING_BUILDER_H_
#define V8_WASM_STRING_BUILDER_H_

#include <cstring>
#include <string>
#include <vector>

#include "src/common/globals.h"

namespace v8 {
namespace internal {
namespace wasm {

// Similar to std::ostringstream, but about 4x faster.
// This base class works best for small-ish strings (up to kChunkSize); for
// producing large amounts of text, you probably want a subclass like
// MultiLineStringBuilder.
class StringBuilder {};

inline StringBuilder& operator<<(StringBuilder& sb, const char* str) {}

inline StringBuilder& operator<<(StringBuilder& sb, char c) {}

inline StringBuilder& operator<<(StringBuilder& sb, const std::string& s) {}

inline StringBuilder& operator<<(StringBuilder& sb, uint32_t n) {}

inline StringBuilder& operator<<(StringBuilder& sb, int value) {}

}  // namespace wasm
}  // namespace internal
}  // namespace v8

#endif  // V8_WASM_STRING_BUILDER_H_