Displaying 4 results from an estimated 4 matches for "__entry__".
Did you mean:
__fentry__
2013 Nov 26
2
[LLVMdev] Disabling optimizations when using llvm::createPrintModulePass
...Type = llvm::IntegerType::get(c, 16);
llvm::Function * llvmFunction = llvm::cast
<llvm::Function>(module.getOrInsertFunction("foo", functionType,
nullptr));
llvmFunction->setCallingConv(llvm::CallingConv::C);
llvm::BasicBlock * body = llvm::BasicBlock::Create(c, "__entry__",
llvmFunction);
llvm::IRBuilder <> builder(body);
llvm::Value * result =
builder.CreateBinOp(llvm::Instruction::BinaryOps::Add,
llvm::ConstantInt::getSigned(functionType, 40),
llvm::ConstantInt::getSigned(functionType, 2));
builder.CreateRet(result);
llvm::verifyModule(...
2013 Nov 28
0
[LLVMdev] Disabling optimizations when using llvm::createPrintModulePass
...pe::get(c, 16);
> llvm::Function * llvmFunction = llvm::cast
> <llvm::Function>(module.getOrInsertFunction("foo", functionType,
> nullptr));
> llvmFunction->setCallingConv(llvm::CallingConv::C);
> llvm::BasicBlock * body = llvm::BasicBlock::Create(c, "__entry__",
> llvmFunction);
> llvm::IRBuilder <> builder(body);
> llvm::Value * result =
> builder.CreateBinOp(llvm::Instruction::BinaryOps::Add,
> llvm::ConstantInt::getSigned(functionType, 40),
> llvm::ConstantInt::getSigned(functionType, 2));
> builder.CreateRet(r...
2013 Dec 08
0
[LLVMdev] Win32: Crash in DLL created by llvm that calls into the "putchar" function
...tchar" function from
LIBCMT.LIB. It works when creating an .exe file, but not when creating
a .dll file and calling into an exported function.
First, let me show how the code works as an .exe:
> cat callPutchar.ll
; ModuleID = 'test'
declare i32 @putchar(i32)
define i32 @main() {
__entry__:
%0 = call i32 @putchar(i32 79)
ret i32 %0
}
> lli callPutchar.ll ; Test, whether the code itself works. Output is as expected an 'O' (ASCII 79):
O
> llc -filetype obj callPutchar.ll ; Create an .obj file and later link it with MSVC's link.exe:
> link.exe /SUBSYSTEM:CONS...
2013 Dec 08
1
[LLVMdev] Win32: Crash in DLL created by llvm that calls into the "putchar" function
Hey Jeremy,
(putting the discussion back to the list.)
2013/12/8 Jeremy Lakeman <Jeremy.Lakeman at gmail.com>:
> If I run your demo exe it crashes, if I re-link the dll with VS 2010 it
> errors gracefully;
>
> runtime error R6030
> - CRT not initialized
>
> putchar is a c runtime function.
> I'm betting that your exe doesn't initialise the runtime library?