Skip to content

Instantly share code, notes, and snippets.

@vihanb
Created Nov 12, 2018
Embed
What would you like to do?
; ModuleID = '<stdin>'
source_filename = "main"
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "wasm32-unknown-unknown-elf"
%0 = type { i32, void ()*, i8* }
%TCString = type { i32, i8* }
@0 = private unnamed_addr constant [14 x i8] c"Hello, World!\00"
@llvm.global_ctors = appending global [1 x %0] zeroinitializer
; Function Attrs: nounwind
define i32 @main(i32, i8** nocapture readnone) local_unnamed_addr #0 {
entry:
tail call i32 @puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @0, i64 0, i64 0)) #0
ret i32 0
}
; Function Attrs: nounwind
define void @FgNprintAstringTCString(%TCString* nocapture readonly) local_unnamed_addr #0 {
entry:
%1 = getelementptr inbounds %TCString, %TCString* %0, i64 0, i32 1
%2 = load i8*, i8** %1, align 8
%3 = tail call i32 @puts(i8* %2)
ret void
}
; Function Attrs: nounwind
declare i32 @puts(i8* nocapture readonly) local_unnamed_addr #0
attributes #0 = { nounwind }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment