obelisk/src/ast/ast.h

40 lines
713 B
C
Raw Normal View History

2022-11-21 21:24:44 -03:00
#ifndef OBELISK_AST_AST_H
#define OBELISK_AST_AST_H
#include <llvm/IR/IRBuilder.h>
#include <llvm/IR/LLVMContext.h>
#include <llvm/IR/Module.h>
#include <llvm/IR/Type.h>
#include <map>
#include <memory>
namespace obelisk
{
2023-02-20 22:01:14 -03:00
/**
* @brief The LLVM context.
*
*/
2022-11-21 21:24:44 -03:00
static std::unique_ptr<llvm::LLVMContext> TheContext;
2023-02-20 22:01:14 -03:00
/**
* @brief The LLVM module.
*
*/
2022-11-21 21:24:44 -03:00
static std::unique_ptr<llvm::Module> TheModule;
2023-02-20 22:01:14 -03:00
/**
* @brief The LLVM IR builder.
*
*/
2022-11-21 21:24:44 -03:00
static std::unique_ptr<llvm::IRBuilder<>> Builder;
2023-02-20 22:01:14 -03:00
/**
* @brief The LLVM named values.
*
*/
2022-11-21 21:24:44 -03:00
static std::map<std::string, llvm::Value *> NamedValues;
} // namespace obelisk
#endif