about summary refs log tree commit diff
path: root/llvm_mode
diff options
context:
space:
mode:
Diffstat (limited to 'llvm_mode')
-rw-r--r--llvm_mode/cmplog-routines-pass.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm_mode/cmplog-routines-pass.cc b/llvm_mode/cmplog-routines-pass.cc
index 623388ba..e05a1843 100644
--- a/llvm_mode/cmplog-routines-pass.cc
+++ b/llvm_mode/cmplog-routines-pass.cc
@@ -164,8 +164,10 @@ bool CmpLogRoutines::hookRtns(Module &M) {
     IRB.SetInsertPoint(callInst);
 
     std::vector<Value *> args;
-    args.push_back(v1P);
-    args.push_back(v2P);
+    Value *              v1Pcasted = IRB.CreatePointerCast(v1P, i8PtrTy);
+    Value *              v2Pcasted = IRB.CreatePointerCast(v2P, i8PtrTy);
+    args.push_back(v1Pcasted);
+    args.push_back(v2Pcasted);
 
     IRB.CreateCall(cmplogHookFn, args, "tmp");