[LLVMdev] IO intrinsics?
Duncan Sands
baldrick at free.fr
Fri May 13 00:21:59 PDT 2011
Hi Hans,
> I found these lines in the BrainF example:
>
>
> //declare i32 @getchar()
> getchar_func = cast<Function>(module->
> getOrInsertFunction("getchar", IntegerType::getInt32Ty(C), NULL));
>
> //declare i32 @putchar(i32)
> putchar_func = cast<Function>(module->
> getOrInsertFunction("putchar", IntegerType::getInt32Ty(C),
> IntegerType::getInt32Ty(C), NULL));
>
>
>
>
> Since getchar and putchar are never defined, I'm assuming they are intrinsics,
no, they are the C standard library functions putchar and getchar.
Ciao, Duncan.
More information about the llvm-dev
mailing list