[llvm] r250374 - Remove DIFile from createSubroutineType.
Eric Christopher via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 14 23:56:11 PDT 2015
Author: echristo
Date: Thu Oct 15 01:56:10 2015
New Revision: 250374
URL: http://llvm.org/viewvc/llvm-project?rev=250374&view=rev
Log:
Remove DIFile from createSubroutineType.
Patch by Amaury Sechet with a small modification by me.
Modified:
llvm/trunk/bindings/go/llvm/DIBuilderBindings.cpp
llvm/trunk/include/llvm/IR/DIBuilder.h
llvm/trunk/lib/IR/DIBuilder.cpp
llvm/trunk/unittests/IR/IRBuilderTest.cpp
llvm/trunk/unittests/Transforms/Utils/Cloning.cpp
Modified: llvm/trunk/bindings/go/llvm/DIBuilderBindings.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/go/llvm/DIBuilderBindings.cpp?rev=250374&r1=250373&r2=250374&view=diff
==============================================================================
--- llvm/trunk/bindings/go/llvm/DIBuilderBindings.cpp (original)
+++ llvm/trunk/bindings/go/llvm/DIBuilderBindings.cpp Thu Oct 15 01:56:10 2015
@@ -128,8 +128,7 @@ LLVMDIBuilderCreateSubroutineType(LLVMDI
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(
Modified: llvm/trunk/include/llvm/IR/DIBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DIBuilder.h?rev=250374&r1=250373&r2=250374&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/DIBuilder.h (original)
+++ llvm/trunk/include/llvm/IR/DIBuilder.h Thu Oct 15 01:56:10 2015
@@ -375,13 +375,11 @@ namespace llvm {
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.
@@ -702,7 +700,7 @@ namespace llvm {
/// 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.
///
Modified: llvm/trunk/lib/IR/DIBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DIBuilder.cpp?rev=250374&r1=250373&r2=250374&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DIBuilder.cpp (original)
+++ llvm/trunk/lib/IR/DIBuilder.cpp Thu Oct 15 01:56:10 2015
@@ -429,8 +429,7 @@ DICompositeType *DIBuilder::createUnionT
return R;
}
-DISubroutineType *DIBuilder::createSubroutineType(DIFile *File,
- DITypeRefArray ParameterTypes,
+DISubroutineType *DIBuilder::createSubroutineType(DITypeRefArray ParameterTypes,
unsigned Flags) {
return DISubroutineType::get(VMContext, Flags, ParameterTypes);
}
Modified: llvm/trunk/unittests/IR/IRBuilderTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/IR/IRBuilderTest.cpp?rev=250374&r1=250373&r2=250374&view=diff
==============================================================================
--- llvm/trunk/unittests/IR/IRBuilderTest.cpp (original)
+++ llvm/trunk/unittests/IR/IRBuilderTest.cpp Thu Oct 15 01:56:10 2015
@@ -312,7 +312,7 @@ TEST_F(IRBuilderTest, DIBuilder) {
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,
@@ -362,7 +362,7 @@ TEST_F(IRBuilderTest, DebugLoc) {
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);
Modified: llvm/trunk/unittests/Transforms/Utils/Cloning.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Transforms/Utils/Cloning.cpp?rev=250374&r1=250373&r2=250374&view=diff
==============================================================================
--- llvm/trunk/unittests/Transforms/Utils/Cloning.cpp (original)
+++ llvm/trunk/unittests/Transforms/Utils/Cloning.cpp Thu Oct 15 01:56:10 2015
@@ -231,7 +231,7 @@ protected:
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);
More information about the llvm-commits
mailing list