You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
528 B
19 lines
528 B
; ModuleID = 'asdf'
|
|
|
|
declare i32 @getchar()
|
|
|
|
declare i32 @putchar(i32)
|
|
|
|
define i32 @main() {
|
|
%malloccall = tail call i8* @malloc(i32 mul (i32 ptrtoint (i8* getelementptr (i8* null, i32 1) to i32), i32 100))
|
|
call void @llvm.memset.p0i8.i32(i8* %malloccall, i8 0, i32 100, i32 1, i1 false)
|
|
%1 = getelementptr i8* %malloccall, i32 50
|
|
tail call void @free(i8* %malloccall)
|
|
ret i32 0
|
|
}
|
|
|
|
declare noalias i8* @malloc(i32)
|
|
|
|
declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind
|
|
|
|
declare void @free(i8*)
|
|
|