diff options
Diffstat (limited to 'src/trans/target.hpp')
-rw-r--r-- | src/trans/target.hpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/trans/target.hpp b/src/trans/target.hpp index 1c081b54..80ba0bf2 100644 --- a/src/trans/target.hpp +++ b/src/trans/target.hpp @@ -10,6 +10,38 @@ #include <cstddef> #include <hir/type.hpp> +enum class CodegenMode +{ + Gnu11, + Msvc, +}; + +struct TargetArch +{ + ::std::string m_name; + unsigned m_pointer_bits; + bool m_big_endian; + + struct { + bool u8; + bool u16; + bool u32; + bool u64; + bool ptr; + } m_atomics; +}; +struct TargetSpec +{ + ::std::string m_family; + ::std::string m_os_name; + ::std::string m_env_name; + + CodegenMode m_codegen_mode; + TargetArch m_arch; +}; + + +extern void Target_SetCfg(); extern bool Target_GetSizeOf(const Span& sp, const ::HIR::TypeRef& ty, size_t& out_size); extern bool Target_GetAlignOf(const Span& sp, const ::HIR::TypeRef& ty, size_t& out_align); |