| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // Copyright (c) 2021-2025 ChilliBits. All rights reserved. | ||
| 2 | |||
| 3 | #pragma once | ||
| 4 | |||
| 5 | #include <CompilerPass.h> | ||
| 6 | #include <SourceFile.h> | ||
| 7 | |||
| 8 | namespace spice::compiler { | ||
| 9 | |||
| 10 | // Forward declarations | ||
| 11 | class GlobalResourceManager; | ||
| 12 | |||
| 13 | class ObjectEmitter : CompilerPass { | ||
| 14 | public: | ||
| 15 | // Constructors | ||
| 16 | ObjectEmitter(GlobalResourceManager &resourceManager, SourceFile *sourceFile); | ||
| 17 | |||
| 18 | // Public methods | ||
| 19 | void emit(const std::filesystem::path &objectPath) const; | ||
| 20 | void getASMString(std::string &output) const; | ||
| 21 | |||
| 22 | private: | ||
| 23 | // Private members | ||
| 24 | llvm::Module &module; | ||
| 25 | }; | ||
| 26 | |||
| 27 | } // namespace spice::compiler | ||
| 28 |