From cd3c09a5c2566d674680193042baf6474b6d0976 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Sun, 18 Oct 2026 08:11:39 +0000 Subject: feat(driver): load the embedded C++ runtime into the JIT Co-Authored-By: Claude Opus 5.5 --- tests/i/extern-cc-runtime/runtime.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/i/extern-cc-runtime/runtime.cc (limited to 'tests/i/extern-cc-runtime/runtime.cc') diff --git a/tests/i/extern-cc-runtime/runtime.cc b/tests/i/extern-cc-runtime/runtime.cc new file mode 100644 index 0000000..fd57538 --- /dev/null +++ b/tests/i/extern-cc-runtime/runtime.cc @@ -0,0 +1,13 @@ +#include +#include +extern "C" int string_length() { + std::string text(4096, 'x'); + text += std::to_string(123); + return static_cast(text.size()); +} +extern "C" void string_throw() { + try { throw std::invalid_argument("string failure"); } + catch (const std::exception &e) { + if (std::string(e.what()) == "string failure") throw; + } +} -- cgit v1.3.1-4-g156e