Advertisement
is_a_cdr

Memset.ll

Nov 21st, 2012
2,567
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
LLVM 1.85 KB | None | 0 0
  1. ; ModuleID = '/tmp/webcompile/_30502_0.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-S128"
  3. target triple = "x86_64-unknown-linux-gnu"
  4.  
  5. @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1
  6.  
  7. define void @InputPassword(i8* %password) nounwind uwtable {
  8.   %1 = tail call i32 (i8*, ...)* @__isoc99_scanf(i8* getelementptr inbounds ([3 x i8]* @.str, i64 0, i64 0), i8* %password) nounwind
  9.   ret void
  10. }
  11.  
  12. declare i32 @__isoc99_scanf(i8*, ...)
  13.  
  14. define void @ProcessPassword(i8* %password) nounwind uwtable {
  15.   %1 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([3 x i8]* @.str, i64 0, i64 0), i8* %password) nounwind
  16.   ret void
  17. }
  18.  
  19. declare i32 @printf(i8* nocapture, ...) nounwind
  20.  
  21. define void @Foo() nounwind uwtable {
  22.   %password = alloca [100 x i8], align 16
  23.   %1 = getelementptr inbounds [100 x i8]* %password, i64 0, i64 0
  24.   %2 = call i32 (i8*, ...)* @__isoc99_scanf(i8* getelementptr inbounds ([3 x i8]* @.str, i64 0, i64 0), i8* %1) nounwind
  25.   %3 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([3 x i8]* @.str, i64 0, i64 0), i8* %1) nounwind
  26.   ret void
  27. }
  28.  
  29. define i32 @main() nounwind uwtable {
  30.   %password.i = alloca [100 x i8], align 16
  31.   %1 = getelementptr inbounds [100 x i8]* %password.i, i64 0, i64 0
  32.   call void @llvm.lifetime.start(i64 -1, i8* %1) nounwind
  33.   %2 = call i32 (i8*, ...)* @__isoc99_scanf(i8* getelementptr inbounds ([3 x i8]* @.str, i64 0, i64 0), i8* %1) nounwind
  34.   %3 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([3 x i8]* @.str, i64 0, i64 0), i8* %1) nounwind
  35.   call void @llvm.lifetime.end(i64 -1, i8* %1) nounwind
  36.   ret i32 0
  37. }
  38.  
  39. declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind
  40.  
  41. declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement