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 f8129b819e3a6da2a3081a0a140a44a8232816f6..81c48b9ef8a8afddc8cee970ef72276bfbd9253b 100644 (file)
@@ -163,7 +163,7 @@ void BrainF::header(LLVMContext& C) {
       };
 
       Constant *msgptr = ConstantExpr::
-        getGetElementPtr(aberrormsg, gep_params);
+        getGetElementPtr(aberrormsg->getValueType(), aberrormsg, gep_params);
 
       Value *puts_params[] = {
         msgptr