### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
// Begin of Foo (from "foo.hlt")
// Compiled by HILTI version X.X.X

#include <hilti/rt/compiler-setup.h>

#include <hilti/rt/libhilti.h>

extern const char* __hlt_hlto_scope;

namespace __hlt::Bar {
    struct __globals_t : ::hilti::rt::trait::isStruct, ::hilti::rt::Controllable<__globals_t> {
        std::string bar{};
        template<typename F> void __visit(F _) const { _("bar", bar); }
    };

    inline unsigned int __globals_index;
    static inline auto __globals() { return ::hilti::rt::detail::moduleGlobals<__globals_t>(__globals_index); }
}

namespace __hlt::Foo {
    struct __globals_t : ::hilti::rt::trait::isStruct, ::hilti::rt::Controllable<__globals_t> {
        std::string foo{};
        template<typename F> void __visit(F _) const { _("foo", foo); }
    };

    inline unsigned int __globals_index;
    static inline auto __globals() {
        return ::hilti::rt::detail::moduleGlobals<__globals_t>(__globals_index);
    }

    extern void __init_globals(::hilti::rt::Context* ctx);
    extern void __init_module();
    extern void __register_module();
}

HILTI_PRE_INIT(__hlt::Foo::__register_module)

extern void __hlt::Foo::__init_globals(::hilti::rt::Context* ctx) {
    ::hilti::rt::detail::initModuleGlobals<__globals_t>(__globals_index);
    __globals()->foo = std::string("Foo!");
}

extern void __hlt::Foo::__init_module() {
      __location__("foo.hlt:10:1");
    ::hilti::rt::print(std::string("Hello, world from Foo!"), ::hilti::rt::Bool(true));
      __location__("foo.hlt:11:1");
    ::hilti::rt::print(Foo::__globals()->foo, ::hilti::rt::Bool(true));
      __location__("foo.hlt:12:1");
    ::hilti::rt::print(Bar::__globals()->bar, ::hilti::rt::Bool(true));
}

extern void __hlt::Foo::__register_module() { ::hilti::rt::detail::registerModule({ "Foo", __hlt_hlto_scope, &__init_module, &__init_globals, nullptr, &__globals_index}); }

/* __HILTI_LINKER_V1__
{"module":"Foo","namespace":"__hlt::Foo","path":"<...>/foo.hlt","version":1}
*/

// Begin of Bar (from "bar.hlt")
// Compiled by HILTI version X.X.X

#include <hilti/rt/compiler-setup.h>

#include <hilti/rt/libhilti.h>

extern const char* __hlt_hlto_scope;

namespace __hlt::Bar {
    struct __globals_t : ::hilti::rt::trait::isStruct, ::hilti::rt::Controllable<__globals_t> {
        std::string bar{};
        template<typename F> void __visit(F _) const { _("bar", bar); }
    };

    inline unsigned int __globals_index;
    static inline auto __globals() { return ::hilti::rt::detail::moduleGlobals<__globals_t>(__globals_index); }
    extern void __init_globals(::hilti::rt::Context* ctx);
    extern void __init_module();
    extern void __register_module();
}

namespace __hlt::Foo {
    struct __globals_t : ::hilti::rt::trait::isStruct, ::hilti::rt::Controllable<__globals_t> {
        std::string foo{};
        template<typename F> void __visit(F _) const { _("foo", foo); }
    };

    inline unsigned int __globals_index;
    static inline auto __globals() {
        return ::hilti::rt::detail::moduleGlobals<__globals_t>(__globals_index);
    }

}

HILTI_PRE_INIT(__hlt::Bar::__register_module)

extern void __hlt::Bar::__init_globals(::hilti::rt::Context* ctx) {
    ::hilti::rt::detail::initModuleGlobals<__globals_t>(__globals_index);
    __globals()->bar = std::string("Bar!");
}

extern void __hlt::Bar::__init_module() {
      __location__("bar.hlt:10:1");
    ::hilti::rt::print(std::string("Hello, world from Bar!"), ::hilti::rt::Bool(true));
      __location__("bar.hlt:11:1");
    ::hilti::rt::print(Foo::__globals()->foo, ::hilti::rt::Bool(true));
      __location__("bar.hlt:12:1");
    ::hilti::rt::print(Bar::__globals()->bar, ::hilti::rt::Bool(true));
}

extern void __hlt::Bar::__register_module() { ::hilti::rt::detail::registerModule({ "Bar", __hlt_hlto_scope, &__init_module, &__init_globals, nullptr, &__globals_index}); }

/* __HILTI_LINKER_V1__
{"module":"Bar","namespace":"__hlt::Bar","path":"<...>/bar.hlt","version":1}
*/

// Begin of __linker__
// Compiled by HILTI version X.X.X

#include <hilti/rt/compiler-setup.h>

// 
// Linker code generated for modules:
//   - Bar (<...>/bar.hlt)
//   - Foo (<...>/foo.hlt)

#include <hilti/rt/libhilti.h>

const char HILTI_EXPORT HILTI_WEAK * __hlt_hlto_library_version = <...>
const char HILTI_EXPORT HILTI_WEAK * __hlt_hlto_bind_to_version = <...>
const char HILTI_WEAK * __hlt_hlto_scope = <...>

