chigraph  master
Systems programming language written for beginners in LLVM
Context.hpp File Reference

Defines the Context class and related functions. More...

#include <memory>
#include <unordered_map>
#include "chi/Fwd.hpp"
#include "chi/ModuleCache.hpp"
#include "chi/Support/Flags.hpp"
#include "chi/Support/json.hpp"
#include <llvm/IR/LLVMContext.h>
#include <llvm/Support/CodeGen.h>
#include <boost/filesystem/path.hpp>
#include <boost/utility/string_view.hpp>
+ Include dependency graph for Context.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  chi::Context
 The class that handles the loading, creation, storing, and compilation of modules It also stores a LLVMContext object to be used everywhere. More...
 

Namespaces

 chi
 The namespace where chigraph lives.
 

Enumerations

enum  chi::CompileSettings {
  chi::CompileSettings::UseCache = 1u,
  chi::CompileSettings::LinkDependencies = 1u << 1,
  chi::CompileSettings::Default = UseCache | LinkDependencies
}
 Settings for compiling modules. More...
 

Functions

Result chi::interpretLLVMIR (std::unique_ptr< llvm::Module > mod, llvm::CodeGenOpt::Level optLevel=llvm::CodeGenOpt::Default, const std::vector< llvm::GenericValue > &args={}, llvm::Function *funcToRun=nullptr, llvm::GenericValue *ret=nullptr)
 Interpret LLVM IR, just a convenience function. More...
 
Result chi::interpretLLVMIRAsMain (std::unique_ptr< llvm::Module > mod, llvm::CodeGenOpt::Level optLevel=llvm::CodeGenOpt::Default, const std::vector< std::string > &args={}, llvm::Function *funcToRun=nullptr, int *ret=nullptr)
 Interpret LLVM IR as if it were the main function. More...
 
std::string chi::stringifyLLVMType (llvm::Type *ty)
 Turns a type into a string. More...
 
boost::filesystem::path chi::workspaceFromChildPath (const boost::filesystem::path &path)
 Get the workspace directory from a child of the workspace directory Example: say you have a workspace at ~/chi/ If you used this with ~/chi/src/ it would return ~/chi/. More...
 

Detailed Description

Defines the Context class and related functions.

Definition in file Context.hpp.