DI/Verifier: Fix argument bitrot in DILocalVariable
[oota-llvm.git] / examples / Kaleidoscope / Chapter8 / toy.cpp
index dbc996d4318267344a811f87a73b82d3cbf27a8f..72e5089177b7c3f3ddda22f18a129b382dbdf487 100644 (file)
@@ -1255,7 +1255,7 @@ void PrototypeAST::CreateArgumentAllocas(Function *F) {
                                         KSDbgInfo.TheCU->getDirectory());
     DILocalVariable *D = DBuilder->createLocalVariable(
         dwarf::DW_TAG_arg_variable, Scope, Args[Idx], Unit, Line,
-        KSDbgInfo.getDoubleTy(), Idx);
+        KSDbgInfo.getDoubleTy(), true, 0, Idx + 1);
 
     DBuilder->insertDeclare(Alloca, D, DBuilder->createExpression(),
                             DebugLoc::get(Line, 0, Scope),