llvm/examples/BrainF: Give an explicit pointee type to ConstantExpr::getGetElementPtr...
authorNAKAMURA Takumi <geek4civic@gmail.com>
Thu, 2 Apr 2015 22:44:00 +0000 (22:44 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Thu, 2 Apr 2015 22:44:00 +0000 (22:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233983 91177308-0d34-0410-b5e6-96231b3b80d8

examples/BrainF/BrainF.cpp

index f8129b8..81c48b9 100644 (file)
@@ -163,7 +163,7 @@ void BrainF::header(LLVMContext& C) {
       };
 
       Constant *msgptr = ConstantExpr::
       };
 
       Constant *msgptr = ConstantExpr::
-        getGetElementPtr(aberrormsg, gep_params);
+        getGetElementPtr(aberrormsg->getValueType(), aberrormsg, gep_params);
 
       Value *puts_params[] = {
         msgptr
 
       Value *puts_params[] = {
         msgptr