Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arcanis/mpllvm
Metaprogramming type resolver for LLVM
https://github.com/arcanis/mpllvm
Last synced: about 2 months ago
JSON representation
Metaprogramming type resolver for LLVM
- Host: GitHub
- URL: https://github.com/arcanis/mpllvm
- Owner: arcanis
- Created: 2012-07-27T21:13:29.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-08-29T08:43:12.000Z (over 12 years ago)
- Last Synced: 2024-05-01T21:19:39.305Z (8 months ago)
- Language: C++
- Size: 126 KB
- Stars: 11
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
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 );
```