Advertisement
Guest User

Untitled

a guest
Jun 29th, 2013
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
LLVM 3.08 KB | None | 0 0
  1. ; ModuleID = 'hello.bc'
  2. target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
  3. target triple = "x86_64-apple-darwin"
  4.  
  5. %tydesc = type { i64, i64, void ({}*, i8*)*, void ({}*, i8*)*, void ({}*, i8*)*, void ({}*, i8*)* }
  6. %str_slice = type { i8*, i64 }
  7.  
  8. @_rust_crate_map_toplevel = global { i32, i8*, i64, [2 x i64] } { i32 1, i8* bitcast (void ({ i64, %tydesc*, i8*, i8*, i8 }*)* @_ZN7cleanup10annihilate16_82984335c95fdd56_07preE to i8*), i64 ptrtoint ([1 x { i64, i64 }]* @_rust_mod_map to i64), [2 x i64] [i64 ptrtoint (i64* @_rust_crate_map_std_0.7-pre_6c65cf4b443341b1 to i64), i64 0] }
  9. @str2968 = internal constant [12 x i8] c"hello world\00"
  10. @_rust_mod_map = internal global [1 x { i64, i64 }] zeroinitializer
  11. @rust_abi_version = constant i64 1
  12.  
  13. declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
  14.  
  15. define void @_ZN4main17_53d91f94251fa9603_00E({ i64, %tydesc*, i8*, i8*, i8 }*) {
  16. static_allocas:
  17.   %1 = alloca %str_slice
  18.   %2 = alloca %str_slice
  19.   br label %"function top level"
  20.  
  21. "function top level":                             ; preds = %static_allocas
  22.   br label %call
  23.  
  24. call:                                             ; preds = %"function top level"
  25.   %3 = getelementptr inbounds %str_slice* %1, i32 0, i32 0
  26.   store i8* getelementptr inbounds ([12 x i8]* @str2968, i32 0, i32 0), i8** %3
  27.   %4 = getelementptr inbounds %str_slice* %1, i32 0, i32 1
  28.   store i64 12, i64* %4
  29.   %5 = bitcast %str_slice* %1 to i8*
  30.   %6 = bitcast %str_slice* %2 to i8*
  31.   call void @llvm.memcpy.p0i8.p0i8.i64(i8* %6, i8* %5, i64 16, i32 8, i1 false)
  32.   call void @_ZN2io7println17_cbd0294d6bc48ab66_07preE({ i64, %tydesc*, i8*, i8*, i8 }* undef, %str_slice* %2)
  33.   br label %next
  34.  
  35. next:                                             ; preds = %call
  36.   br label %return
  37.  
  38. return:                                           ; preds = %next
  39.   ret void
  40. }
  41.  
  42. define void @_rust_main({ i64, %tydesc*, i8*, i8*, i8 }*) {
  43. static_allocas:
  44.   br label %"function top level"
  45.  
  46. return:                                           ; preds = %"function top level"
  47.   ret void
  48.  
  49. "function top level":                             ; preds = %static_allocas
  50.   call void @_ZN4main17_53d91f94251fa9603_00E({ i64, %tydesc*, i8*, i8*, i8 }* %0)
  51.   br label %return
  52. }
  53.  
  54. define i64 @main(i64, i8**) {
  55. top:
  56.   %2 = call i64 @_ZN8unstable4lang5start17_76d6c774aa357c7a6_07preE({ i64, %tydesc*, i8*, i8*, i8 }* null, i8* bitcast (void ({ i64, %tydesc*, i8*, i8*, i8 }*)* @_rust_main to i8*), i64 %0, i8** %1, i8* bitcast ({ i32, i8*, i64, [2 x i64] }* @_rust_crate_map_toplevel to i8*))
  57.   ret i64 %2
  58. }
  59.  
  60.  
  61. declare void @_ZN2io7println17_cbd0294d6bc48ab66_07preE({ i64, %tydesc*, i8*, i8*, i8 }*, %str_slice*)
  62.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement