Skip to content

arcanis/mpllvm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

trivia.mpllvm

Metaprogramming type resolver for LLVM (using C++11)

  • llvm::Type * mpllvm::get< T >( llvm::LLVMContext & llvmContext )

    Returns the corresponding LLVM type of T.

    ```
    llvm::Type * foo = mpllvm::get< int >( llvmContext );
    ```
    
  • llvm::Type * mpllvm::deduce( llvm::LLVMContext & llvmContext, T const & t )

    Returns the corresponding LLVM type of the value t.

    ```
    llvm::Type * foo = mpllvm::deduce( llvmContext, &malloc );
    ```
    
  • llvm::StructType * mpllvm::craft< T... >( llvm::LLVMContext & llvmContext, bool isPacked = false )

    Returns a LLVM structure type whose each field is one of the template parameter.

    ```
    llvm::StructType * foo = mpllvm::craft< int, int >( llvmContext );
    ```
    

About

Metaprogramming type resolver for LLVM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published