Displaying 8 results from an estimated 8 matches for "func_typ".
Did you mean:
func_type
2017 Jan 09
3
[cfe-dev] Modernizing LLVM Coding Style Guide and enforcing Clang-tidy
Hi,
Sorry I fat fingered an earlier send in the previous email. I was
trying to say:
On Mon, Jan 9, 2017 at 2:52 PM, Sanjoy Das
<sanjoy at playingwithpointers.com> wrote:
>> +1 Exactly this.
>> I don't think C programmer will not understand using. The "=" makes it much
>> simpler to read, even if it is the first time you see it, which is not the
>>
2017 Jan 10
2
[cfe-dev] Modernizing LLVM Coding Style Guide and enforcing Clang-tidy
...&);
>>
>> void f(fptr* ptr) {
>> ...
>> }
>>
>> easier to read than the "using" declaration (especially the second
>> form, with the explicit `fptr* ptr`).
>>
>
> Not sure I follow. You're saying this:
>
> typedef int func_type(const int&);
>
> is easier for you to read than this:
>
> using func_type = int(const int&);
>
> ?
>
>
I never saw syntax
typedef int funct_type(const int&);
I tried to use it and I got compile error for code:
int z(const int&);
int main() {
typedef...
2008 Aug 19
7
[LLVMdev] Please help with LLVM C++ integration
...int _tmain(int argc, _TCHAR* argv[]){
Module *M = new Module("test");
ExistingModuleProvider* MP = new ExistingModuleProvider(M);
ExecutionEngine* EE = ExecutionEngine::create(MP, false);
std::vector<const Type *> func_args;
func_args.push_back(Type::Int32Ty);
FunctionType * func_type = FunctionType::get(Type::Int32Ty, func_args, false);
Function * my_function = Function::Create( func_type,
Function::ExternalLinkage, "some_test_func", M );
EE->addGlobalMapping( my_function, (void*)&some_test_func );
Function *FooF = cast<Function>(M->getOrInsertFun...
2008 Aug 19
0
[LLVMdev] Please help with LLVM C++ integration
...quot;test");
> ExistingModuleProvider* MP = new ExistingModuleProvider(M);
> ExecutionEngine* EE = ExecutionEngine::create(MP, false);
>
> std::vector<const Type *> func_args;
> func_args.push_back(Type::Int32Ty);
> FunctionType * func_type = FunctionType::get(Type::Int32Ty,
> func_args, false);
> Function * my_function = Function::Create( func_type,
> Function::ExternalLinkage, "some_test_func", M );
> EE->addGlobalMapping( my_function, (void*)&some_test_func );
>
> Function...
2008 Aug 19
0
[LLVMdev] Please help with LLVM C++ integration
...quot;test");
> ExistingModuleProvider* MP = new ExistingModuleProvider(M);
> ExecutionEngine* EE = ExecutionEngine::create(MP, false);
>
> std::vector<const Type *> func_args;
> func_args.push_back(Type::Int32Ty);
> FunctionType * func_type = FunctionType::get(Type::Int32Ty, func_args, false);
> Function * my_function = Function::Create( func_type,
> Function::ExternalLinkage, "some_test_func", M );
> EE->addGlobalMapping( my_function, (void*)&some_test_func );
>
> Function *Foo...
2017 Mar 31
2
How to write the same things as `opt` command in C++ API
...der
llvm::IRBuilder<> builder(block);
builder.SetInsertPoint(block);
llvm::Value *res =
llvm::ConstantInt::get(llvm::Type::getInt32Ty(context), 2);
builder.CreateRet(res);
llvm::verifyFunction(*cFun);
}
/// @brief Start of Main function
{
llvm::FunctionType *const func_type =
llvm::FunctionType::get(llvm::Type::getInt32Ty(context), false);
llvm::Function *const main_func =
llvm::Function::Create(func_type, llvm::Function::ExternalLinkage,
"main",
module.get());
llvm::BasicBlock *const entr...
2008 Aug 19
0
[LLVMdev] Please help with LLVM C++ integration
On Aug 19, 2008, at 13:36, kirill havok wrote:
> I got very interested in LLVM project, and I decided to start
> writing my own scripting language based on it. By studying the
> documentation, I could not find how to call external function,
> written in C. That is, I have a set of functions written in C/C++, I
> generate code, using LLVM C++ interface, how can I call(or
2008 Aug 19
5
[LLVMdev] Please help with LLVM C++ integration
Hello,
I got very interested in LLVM project, and I decided to start writing
my own scripting language based on it. By studying the documentation,
I could not find how to call external function, written in C. That is,
I have a set of functions written in C/C++, I generate code, using
LLVM C++ interface, how can I call(or register in machine in run-time)
my external functions? Maybe I just missed