- DIVariable V = D->createLocalVariable(
- Tag, DIDescriptor(unwrap<MDScope>(Scope)), Name, unwrap<MDFile>(File),
- Line, unwrap<MDType>(Ty), AlwaysPreserve, Flags, ArgNo);
- return wrap(V);
+ // FIXME: Update the Go bindings to match the DIBuilder API.
+ if (ArgNo)
+ return wrap(D->createParameterVariable(
+ unwrap<DIScope>(Scope), Name, ArgNo, unwrap<DIFile>(File), Line,
+ unwrap<DIType>(Ty), AlwaysPreserve, Flags));
+ return wrap(D->createAutoVariable(unwrap<DIScope>(Scope), Name,
+ unwrap<DIFile>(File), Line,
+ unwrap<DIType>(Ty), AlwaysPreserve, Flags));