LLVMMetadataRef ParameterTypes) {
DIBuilder *D = unwrap(Dref);
return wrap(
- D->createSubroutineType(File ? unwrap<DIFile>(File) : nullptr,
- DITypeRefArray(unwrap<MDTuple>(ParameterTypes))));
+ D->createSubroutineType(DITypeRefArray(unwrap<MDTuple>(ParameterTypes))));
}
LLVMMetadataRef LLVMDIBuilderCreateStructType(
DIType *UnderlyingType, StringRef UniqueIdentifier = "");
/// Create subroutine type.
- /// \param File File in which this subroutine is defined.
/// \param ParameterTypes An array of subroutine parameter types. This
/// includes return type at 0th index.
/// \param Flags E.g.: LValueReference.
/// These flags are used to emit dwarf attributes.
- DISubroutineType *createSubroutineType(DIFile *File,
- DITypeRefArray ParameterTypes,
+ DISubroutineType *createSubroutineType(DITypeRefArray ParameterTypes,
unsigned Flags = 0);
/// Create an external type reference.
/// has a self-reference -- \a DIBuilder needs to track the array to
/// resolve cycles.
void replaceArrays(DICompositeType *&T, DINodeArray Elements,
- DINodeArray TParems = DINodeArray());
+ DINodeArray TParams = DINodeArray());
/// Replace a temporary node.
///
return R;
}
-DISubroutineType *DIBuilder::createSubroutineType(DIFile *File,
- DITypeRefArray ParameterTypes,
+DISubroutineType *DIBuilder::createSubroutineType(DITypeRefArray ParameterTypes,
unsigned Flags) {
return DISubroutineType::get(VMContext, Flags, ParameterTypes);
}
auto File = DIB.createFile("F.CBL", "/");
auto CU = DIB.createCompileUnit(dwarf::DW_LANG_Cobol74, "F.CBL", "/",
"llvm-cobol74", true, "", 0);
- auto Type = DIB.createSubroutineType(File, DIB.getOrCreateTypeArray(None));
+ auto Type = DIB.createSubroutineType(DIB.getOrCreateTypeArray(None));
DIB.createFunction(CU, "foo", "", File, 1, Type, false, true, 1, 0, true, F);
AllocaInst *I = Builder.CreateAlloca(Builder.getInt8Ty());
auto BarSP = DIB.createFunction(CU, "bar", "", File, 1, Type, false, true, 1,
auto File = DIB.createFile("tmp.cpp", "/");
auto CU = DIB.createCompileUnit(dwarf::DW_LANG_C_plus_plus_11, "tmp.cpp", "/",
"", true, "", 0);
- auto SPType = DIB.createSubroutineType(File, DIB.getOrCreateTypeArray(None));
+ auto SPType = DIB.createSubroutineType(DIB.getOrCreateTypeArray(None));
auto SP =
DIB.createFunction(CU, "foo", "foo", File, 1, SPType, false, true, 1);
DebugLoc DL1 = DILocation::get(Ctx, 2, 0, SP);
auto *File = DBuilder.createFile("filename.c", "/file/dir/");
DITypeRefArray ParamTypes = DBuilder.getOrCreateTypeArray(None);
DISubroutineType *FuncType =
- DBuilder.createSubroutineType(File, ParamTypes);
+ DBuilder.createSubroutineType(ParamTypes);
auto *CU =
DBuilder.createCompileUnit(dwarf::DW_LANG_C99, "filename.c",
"/file/dir", "CloneFunc", false, "", 0);