1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00

Clean up, formatting, comments. No functional change.

llvm-svn: 192747
This commit is contained in:
Eric Christopher 2013-10-15 23:31:31 +00:00
parent acf0c41730
commit 772fd268c4

View File

@ -30,10 +30,8 @@ static Constant *GetTagConstant(LLVMContext &VMContext, unsigned Tag) {
} }
DIBuilder::DIBuilder(Module &m) DIBuilder::DIBuilder(Module &m)
: M(m), VMContext(M.getContext()), TempEnumTypes(0), : M(m), VMContext(M.getContext()), TempEnumTypes(0), TempRetainTypes(0),
TempRetainTypes(0), TempSubprograms(0), TempGVs(0), DeclareFn(0), TempSubprograms(0), TempGVs(0), DeclareFn(0), ValueFn(0) {}
ValueFn(0)
{}
/// finalize - Construct any deferred debug info descriptors. /// finalize - Construct any deferred debug info descriptors.
void DIBuilder::finalize() { void DIBuilder::finalize() {
@ -88,7 +86,7 @@ static MDNode *createFilePathPair(LLVMContext &VMContext, StringRef Filename,
assert(!Filename.empty() && "Unable to create file without name"); assert(!Filename.empty() && "Unable to create file without name");
Value *Pair[] = { Value *Pair[] = {
MDString::get(VMContext, Filename), MDString::get(VMContext, Filename),
MDString::get(VMContext, Directory), MDString::get(VMContext, Directory)
}; };
return MDNode::get(VMContext, Pair); return MDNode::get(VMContext, Pair);
} }
@ -317,8 +315,8 @@ DIDerivedType DIBuilder::createMemberPointerType(DIType PointeeTy,
NULL, // Unused NULL, // Unused
NULL, NULL,
ConstantInt::get(Type::getInt32Ty(VMContext), 0), // Line ConstantInt::get(Type::getInt32Ty(VMContext), 0), // Line
ConstantInt::get(Type::getInt64Ty(VMContext), 0), ConstantInt::get(Type::getInt64Ty(VMContext), 0), // Size
ConstantInt::get(Type::getInt64Ty(VMContext), 0), ConstantInt::get(Type::getInt64Ty(VMContext), 0), // Align
ConstantInt::get(Type::getInt64Ty(VMContext), 0), // Offset ConstantInt::get(Type::getInt64Ty(VMContext), 0), // Offset
ConstantInt::get(Type::getInt32Ty(VMContext), 0), // Flags ConstantInt::get(Type::getInt32Ty(VMContext), 0), // Flags
PointeeTy.getRef(), PointeeTy.getRef(),
@ -389,8 +387,9 @@ DIDerivedType DIBuilder::createFriend(DIType Ty, DIType FriendTy) {
/// createInheritance - Create debugging information entry to establish /// createInheritance - Create debugging information entry to establish
/// inheritance relationship between two types. /// inheritance relationship between two types.
DIDerivedType DIBuilder::createInheritance( DIDerivedType DIBuilder::createInheritance(DIType Ty, DIType BaseTy,
DIType Ty, DIType BaseTy, uint64_t BaseOffset, unsigned Flags) { uint64_t BaseOffset,
unsigned Flags) {
assert(Ty.isType() && "Unable to create inheritance"); assert(Ty.isType() && "Unable to create inheritance");
// TAG_inheritance is encoded in DIDerivedType format. // TAG_inheritance is encoded in DIDerivedType format.
Value *Elts[] = { Value *Elts[] = {
@ -409,10 +408,12 @@ DIDerivedType DIBuilder::createInheritance(
} }
/// createMemberType - Create debugging information entry for a member. /// createMemberType - Create debugging information entry for a member.
DIDerivedType DIBuilder::createMemberType( DIDerivedType DIBuilder::createMemberType(DIDescriptor Scope, StringRef Name,
DIDescriptor Scope, StringRef Name, DIFile File, unsigned LineNumber, DIFile File, unsigned LineNumber,
uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits, uint64_t SizeInBits,
unsigned Flags, DIType Ty) { uint64_t AlignInBits,
uint64_t OffsetInBits, unsigned Flags,
DIType Ty) {
// TAG_member is encoded in DIDerivedType format. // TAG_member is encoded in DIDerivedType format.
Value *Elts[] = { Value *Elts[] = {
GetTagConstant(VMContext, dwarf::DW_TAG_member), GetTagConstant(VMContext, dwarf::DW_TAG_member),
@ -444,9 +445,9 @@ DIBuilder::createStaticMemberType(DIDescriptor Scope, StringRef Name,
DIScope(getNonCompileUnitScope(Scope)).getRef(), DIScope(getNonCompileUnitScope(Scope)).getRef(),
MDString::get(VMContext, Name), MDString::get(VMContext, Name),
ConstantInt::get(Type::getInt32Ty(VMContext), LineNumber), ConstantInt::get(Type::getInt32Ty(VMContext), LineNumber),
ConstantInt::get(Type::getInt64Ty(VMContext), 0/*SizeInBits*/), ConstantInt::get(Type::getInt64Ty(VMContext), 0), // Size
ConstantInt::get(Type::getInt64Ty(VMContext), 0/*AlignInBits*/), ConstantInt::get(Type::getInt64Ty(VMContext), 0), // Align
ConstantInt::get(Type::getInt64Ty(VMContext), 0/*OffsetInBits*/), ConstantInt::get(Type::getInt64Ty(VMContext), 0), // Offset
ConstantInt::get(Type::getInt32Ty(VMContext), Flags), ConstantInt::get(Type::getInt32Ty(VMContext), Flags),
Ty.getRef(), Ty.getRef(),
Val Val
@ -457,13 +458,11 @@ DIBuilder::createStaticMemberType(DIDescriptor Scope, StringRef Name,
/// createObjCIVar - Create debugging information entry for Objective-C /// createObjCIVar - Create debugging information entry for Objective-C
/// instance variable. /// instance variable.
DIDerivedType DIDerivedType
DIBuilder::createObjCIVar(StringRef Name, DIBuilder::createObjCIVar(StringRef Name, DIFile File, unsigned LineNumber,
DIFile File, unsigned LineNumber,
uint64_t SizeInBits, uint64_t AlignInBits, uint64_t SizeInBits, uint64_t AlignInBits,
uint64_t OffsetInBits, unsigned Flags, uint64_t OffsetInBits, unsigned Flags, DIType Ty,
DIType Ty, StringRef PropertyName, StringRef PropertyName, StringRef GetterName,
StringRef GetterName, StringRef SetterName, StringRef SetterName, unsigned PropertyAttributes) {
unsigned PropertyAttributes) {
// TAG_member is encoded in DIDerivedType format. // TAG_member is encoded in DIDerivedType format.
Value *Elts[] = { Value *Elts[] = {
GetTagConstant(VMContext, dwarf::DW_TAG_member), GetTagConstant(VMContext, dwarf::DW_TAG_member),
@ -486,10 +485,10 @@ DIBuilder::createObjCIVar(StringRef Name,
/// createObjCIVar - Create debugging information entry for Objective-C /// createObjCIVar - Create debugging information entry for Objective-C
/// instance variable. /// instance variable.
DIDerivedType DIDerivedType DIBuilder::createObjCIVar(StringRef Name, DIFile File,
DIBuilder::createObjCIVar(StringRef Name, unsigned LineNumber,
DIFile File, unsigned LineNumber, uint64_t SizeInBits,
uint64_t SizeInBits, uint64_t AlignInBits, uint64_t AlignInBits,
uint64_t OffsetInBits, unsigned Flags, uint64_t OffsetInBits, unsigned Flags,
DIType Ty, MDNode *PropertyNode) { DIType Ty, MDNode *PropertyNode) {
// TAG_member is encoded in DIDerivedType format. // TAG_member is encoded in DIDerivedType format.
@ -511,12 +510,10 @@ DIBuilder::createObjCIVar(StringRef Name,
/// createObjCProperty - Create debugging information entry for Objective-C /// createObjCProperty - Create debugging information entry for Objective-C
/// property. /// property.
DIObjCProperty DIBuilder::createObjCProperty(StringRef Name, DIObjCProperty
DIFile File, unsigned LineNumber, DIBuilder::createObjCProperty(StringRef Name, DIFile File, unsigned LineNumber,
StringRef GetterName, StringRef GetterName, StringRef SetterName,
StringRef SetterName, unsigned PropertyAttributes, DIType Ty) {
unsigned PropertyAttributes,
DIType Ty) {
Value *Elts[] = { Value *Elts[] = {
GetTagConstant(VMContext, dwarf::DW_TAG_APPLE_property), GetTagConstant(VMContext, dwarf::DW_TAG_APPLE_property),
MDString::get(VMContext, Name), MDString::get(VMContext, Name),
@ -692,7 +689,7 @@ DICompositeType DIBuilder::createUnionType(DIDescriptor Scope, StringRef Name,
ConstantInt::get(Type::getInt32Ty(VMContext), LineNumber), ConstantInt::get(Type::getInt32Ty(VMContext), LineNumber),
ConstantInt::get(Type::getInt64Ty(VMContext), SizeInBits), ConstantInt::get(Type::getInt64Ty(VMContext), SizeInBits),
ConstantInt::get(Type::getInt64Ty(VMContext), AlignInBits), ConstantInt::get(Type::getInt64Ty(VMContext), AlignInBits),
ConstantInt::get(Type::getInt64Ty(VMContext), 0), ConstantInt::get(Type::getInt64Ty(VMContext), 0), // Offset
ConstantInt::get(Type::getInt32Ty(VMContext), Flags), ConstantInt::get(Type::getInt32Ty(VMContext), Flags),
NULL, NULL,
Elements, Elements,
@ -708,19 +705,19 @@ DICompositeType DIBuilder::createUnionType(DIDescriptor Scope, StringRef Name,
} }
/// createSubroutineType - Create subroutine type. /// createSubroutineType - Create subroutine type.
DICompositeType DICompositeType DIBuilder::createSubroutineType(DIFile File,
DIBuilder::createSubroutineType(DIFile File, DIArray ParameterTypes) { DIArray ParameterTypes) {
// TAG_subroutine_type is encoded in DICompositeType format. // TAG_subroutine_type is encoded in DICompositeType format.
Value *Elts[] = { Value *Elts[] = {
GetTagConstant(VMContext, dwarf::DW_TAG_subroutine_type), GetTagConstant(VMContext, dwarf::DW_TAG_subroutine_type),
Constant::getNullValue(Type::getInt32Ty(VMContext)), Constant::getNullValue(Type::getInt32Ty(VMContext)),
NULL, NULL,
MDString::get(VMContext, ""), MDString::get(VMContext, ""),
ConstantInt::get(Type::getInt32Ty(VMContext), 0), ConstantInt::get(Type::getInt32Ty(VMContext), 0), // Line
ConstantInt::get(Type::getInt64Ty(VMContext), 0), ConstantInt::get(Type::getInt64Ty(VMContext), 0), // Size
ConstantInt::get(Type::getInt64Ty(VMContext), 0), ConstantInt::get(Type::getInt64Ty(VMContext), 0), // Align
ConstantInt::get(Type::getInt64Ty(VMContext), 0), ConstantInt::get(Type::getInt64Ty(VMContext), 0), // Offset
ConstantInt::get(Type::getInt32Ty(VMContext), 0), ConstantInt::get(Type::getInt32Ty(VMContext), 0), // Flags
NULL, NULL,
ParameterTypes, ParameterTypes,
ConstantInt::get(Type::getInt32Ty(VMContext), 0), ConstantInt::get(Type::getInt32Ty(VMContext), 0),
@ -746,8 +743,8 @@ DICompositeType DIBuilder::createEnumerationType(
ConstantInt::get(Type::getInt32Ty(VMContext), LineNumber), ConstantInt::get(Type::getInt32Ty(VMContext), LineNumber),
ConstantInt::get(Type::getInt64Ty(VMContext), SizeInBits), ConstantInt::get(Type::getInt64Ty(VMContext), SizeInBits),
ConstantInt::get(Type::getInt64Ty(VMContext), AlignInBits), ConstantInt::get(Type::getInt64Ty(VMContext), AlignInBits),
ConstantInt::get(Type::getInt32Ty(VMContext), 0), ConstantInt::get(Type::getInt32Ty(VMContext), 0), // Offset
ConstantInt::get(Type::getInt32Ty(VMContext), 0), ConstantInt::get(Type::getInt32Ty(VMContext), 0), // Flags
UnderlyingType.getRef(), UnderlyingType.getRef(),
Elements, Elements,
ConstantInt::get(Type::getInt32Ty(VMContext), 0), ConstantInt::get(Type::getInt32Ty(VMContext), 0),
@ -771,11 +768,11 @@ DICompositeType DIBuilder::createArrayType(uint64_t Size, uint64_t AlignInBits,
NULL, // Filename/Directory, NULL, // Filename/Directory,
NULL, // Unused NULL, // Unused
MDString::get(VMContext, ""), MDString::get(VMContext, ""),
ConstantInt::get(Type::getInt32Ty(VMContext), 0), ConstantInt::get(Type::getInt32Ty(VMContext), 0), // Line
ConstantInt::get(Type::getInt64Ty(VMContext), Size), ConstantInt::get(Type::getInt64Ty(VMContext), Size),
ConstantInt::get(Type::getInt64Ty(VMContext), AlignInBits), ConstantInt::get(Type::getInt64Ty(VMContext), AlignInBits),
ConstantInt::get(Type::getInt32Ty(VMContext), 0), ConstantInt::get(Type::getInt32Ty(VMContext), 0), // Offset
ConstantInt::get(Type::getInt32Ty(VMContext), 0), ConstantInt::get(Type::getInt32Ty(VMContext), 0), // Flags
Ty.getRef(), Ty.getRef(),
Subscripts, Subscripts,
ConstantInt::get(Type::getInt32Ty(VMContext), 0), ConstantInt::get(Type::getInt32Ty(VMContext), 0),
@ -795,10 +792,10 @@ DICompositeType DIBuilder::createVectorType(uint64_t Size, uint64_t AlignInBits,
NULL, // Filename/Directory, NULL, // Filename/Directory,
NULL, // Unused NULL, // Unused
MDString::get(VMContext, ""), MDString::get(VMContext, ""),
ConstantInt::get(Type::getInt32Ty(VMContext), 0), ConstantInt::get(Type::getInt32Ty(VMContext), 0), // Line
ConstantInt::get(Type::getInt64Ty(VMContext), Size), ConstantInt::get(Type::getInt64Ty(VMContext), Size),
ConstantInt::get(Type::getInt64Ty(VMContext), AlignInBits), ConstantInt::get(Type::getInt64Ty(VMContext), AlignInBits),
ConstantInt::get(Type::getInt32Ty(VMContext), 0), ConstantInt::get(Type::getInt32Ty(VMContext), 0), // Offset
ConstantInt::get(Type::getInt32Ty(VMContext), DIType::FlagVector), ConstantInt::get(Type::getInt32Ty(VMContext), DIType::FlagVector),
Ty.getRef(), Ty.getRef(),
Subscripts, Subscripts,
@ -825,6 +822,7 @@ DIType DIBuilder::createArtificialType(DIType Ty) {
CurFlags = CurFlags | DIType::FlagArtificial; CurFlags = CurFlags | DIType::FlagArtificial;
// Flags are stored at this slot. // Flags are stored at this slot.
// FIXME: Add an enum for this magic value.
Elts[8] = ConstantInt::get(Type::getInt32Ty(VMContext), CurFlags); Elts[8] = ConstantInt::get(Type::getInt32Ty(VMContext), CurFlags);
return DIType(MDNode::get(VMContext, Elts)); return DIType(MDNode::get(VMContext, Elts));
@ -846,6 +844,7 @@ DIType DIBuilder::createObjectPointerType(DIType Ty) {
CurFlags = CurFlags | (DIType::FlagObjectPointer | DIType::FlagArtificial); CurFlags = CurFlags | (DIType::FlagObjectPointer | DIType::FlagArtificial);
// Flags are stored at this slot. // Flags are stored at this slot.
// FIXME: Add an enum for this magic value.
Elts[8] = ConstantInt::get(Type::getInt32Ty(VMContext), CurFlags); Elts[8] = ConstantInt::get(Type::getInt32Ty(VMContext), CurFlags);
return DIType(MDNode::get(VMContext, Elts)); return DIType(MDNode::get(VMContext, Elts));
@ -868,11 +867,10 @@ DIDescriptor DIBuilder::createUnspecifiedParameter() {
/// createForwardDecl - Create a temporary forward-declared type that /// createForwardDecl - Create a temporary forward-declared type that
/// can be RAUW'd if the full type is seen. /// can be RAUW'd if the full type is seen.
DICompositeType DIBuilder::createForwardDecl(unsigned Tag, StringRef Name, DICompositeType
DIDescriptor Scope, DIFile F, DIBuilder::createForwardDecl(unsigned Tag, StringRef Name, DIDescriptor Scope,
unsigned Line, unsigned RuntimeLang, DIFile F, unsigned Line, unsigned RuntimeLang,
uint64_t SizeInBits, uint64_t SizeInBits, uint64_t AlignInBits,
uint64_t AlignInBits,
StringRef UniqueIdentifier) { StringRef UniqueIdentifier) {
// Create a temporary MDNode. // Create a temporary MDNode.
Value *Elts[] = { Value *Elts[] = {
@ -883,9 +881,8 @@ DICompositeType DIBuilder::createForwardDecl(unsigned Tag, StringRef Name,
ConstantInt::get(Type::getInt32Ty(VMContext), Line), ConstantInt::get(Type::getInt32Ty(VMContext), Line),
ConstantInt::get(Type::getInt64Ty(VMContext), SizeInBits), ConstantInt::get(Type::getInt64Ty(VMContext), SizeInBits),
ConstantInt::get(Type::getInt64Ty(VMContext), AlignInBits), ConstantInt::get(Type::getInt64Ty(VMContext), AlignInBits),
ConstantInt::get(Type::getInt32Ty(VMContext), 0), ConstantInt::get(Type::getInt32Ty(VMContext), 0), // Offset
ConstantInt::get(Type::getInt32Ty(VMContext), ConstantInt::get(Type::getInt32Ty(VMContext), DIDescriptor::FlagFwdDecl),
DIDescriptor::FlagFwdDecl),
NULL, NULL,
DIArray(), DIArray(),
ConstantInt::get(Type::getInt32Ty(VMContext), RuntimeLang), ConstantInt::get(Type::getInt32Ty(VMContext), RuntimeLang),
@ -924,9 +921,10 @@ DISubrange DIBuilder::getOrCreateSubrange(int64_t Lo, int64_t Count) {
} }
/// \brief Create a new descriptor for the specified global. /// \brief Create a new descriptor for the specified global.
DIGlobalVariable DIBuilder:: DIGlobalVariable DIBuilder::createGlobalVariable(StringRef Name,
createGlobalVariable(StringRef Name, StringRef LinkageName, DIFile F, StringRef LinkageName,
unsigned LineNumber, DIType Ty, bool isLocalToUnit, DIFile F, unsigned LineNumber,
DIType Ty, bool isLocalToUnit,
Value *Val) { Value *Val) {
Value *Elts[] = { Value *Elts[] = {
GetTagConstant(VMContext, dwarf::DW_TAG_variable), GetTagConstant(VMContext, dwarf::DW_TAG_variable),
@ -949,19 +947,22 @@ createGlobalVariable(StringRef Name, StringRef LinkageName, DIFile F,
} }
/// \brief Create a new descriptor for the specified global. /// \brief Create a new descriptor for the specified global.
DIGlobalVariable DIBuilder:: DIGlobalVariable DIBuilder::createGlobalVariable(StringRef Name, DIFile F,
createGlobalVariable(StringRef Name, DIFile F, unsigned LineNumber, unsigned LineNumber, DIType Ty,
DIType Ty, bool isLocalToUnit, Value *Val) { bool isLocalToUnit,
Value *Val) {
return createGlobalVariable(Name, Name, F, LineNumber, Ty, isLocalToUnit, return createGlobalVariable(Name, Name, F, LineNumber, Ty, isLocalToUnit,
Val); Val);
} }
/// createStaticVariable - Create a new descriptor for the specified static /// createStaticVariable - Create a new descriptor for the specified static
/// variable. /// variable.
DIGlobalVariable DIBuilder:: DIGlobalVariable DIBuilder::createStaticVariable(DIDescriptor Context,
createStaticVariable(DIDescriptor Context, StringRef Name, StringRef Name,
StringRef LinkageName, DIFile F, unsigned LineNumber, StringRef LinkageName,
DIType Ty, bool isLocalToUnit, Value *Val, MDNode *Decl) { DIFile F, unsigned LineNumber,
DIType Ty, bool isLocalToUnit,
Value *Val, MDNode *Decl) {
Value *Elts[] = { Value *Elts[] = {
GetTagConstant(VMContext, dwarf::DW_TAG_variable), GetTagConstant(VMContext, dwarf::DW_TAG_variable),
Constant::getNullValue(Type::getInt32Ty(VMContext)), Constant::getNullValue(Type::getInt32Ty(VMContext)),
@ -1043,17 +1044,13 @@ DIVariable DIBuilder::createComplexVariable(unsigned Tag, DIDescriptor Scope,
/// createFunction - Create a new descriptor for the specified function. /// createFunction - Create a new descriptor for the specified function.
/// FIXME: this is added for dragonegg. Once we update dragonegg /// FIXME: this is added for dragonegg. Once we update dragonegg
/// to call resolve function, this will be removed. /// to call resolve function, this will be removed.
DISubprogram DIBuilder::createFunction(DIScopeRef Context, DISubprogram DIBuilder::createFunction(DIScopeRef Context, StringRef Name,
StringRef Name, StringRef LinkageName, DIFile File,
StringRef LinkageName, unsigned LineNo, DICompositeType Ty,
DIFile File, unsigned LineNo,
DICompositeType Ty,
bool isLocalToUnit, bool isDefinition, bool isLocalToUnit, bool isDefinition,
unsigned ScopeLine, unsigned ScopeLine, unsigned Flags,
unsigned Flags, bool isOptimized, bool isOptimized, Function *Fn,
Function *Fn, MDNode *TParams, MDNode *Decl) {
MDNode *TParams,
MDNode *Decl) {
// dragonegg does not generate identifier for types, so using an empty map // dragonegg does not generate identifier for types, so using an empty map
// to resolve the context should be fine. // to resolve the context should be fine.
DITypeIdentifierMap EmptyMap; DITypeIdentifierMap EmptyMap;
@ -1063,17 +1060,13 @@ DISubprogram DIBuilder::createFunction(DIScopeRef Context,
} }
/// createFunction - Create a new descriptor for the specified function. /// createFunction - Create a new descriptor for the specified function.
DISubprogram DIBuilder::createFunction(DIDescriptor Context, DISubprogram DIBuilder::createFunction(DIDescriptor Context, StringRef Name,
StringRef Name, StringRef LinkageName, DIFile File,
StringRef LinkageName, unsigned LineNo, DICompositeType Ty,
DIFile File, unsigned LineNo,
DICompositeType Ty,
bool isLocalToUnit, bool isDefinition, bool isLocalToUnit, bool isDefinition,
unsigned ScopeLine, unsigned ScopeLine, unsigned Flags,
unsigned Flags, bool isOptimized, bool isOptimized, Function *Fn,
Function *Fn, MDNode *TParams, MDNode *Decl) {
MDNode *TParams,
MDNode *Decl) {
assert(Ty.getTag() == dwarf::DW_TAG_subroutine_type && assert(Ty.getTag() == dwarf::DW_TAG_subroutine_type &&
"function types should be subroutines"); "function types should be subroutines");
Value *TElts[] = { GetTagConstant(VMContext, DW_TAG_base_type) }; Value *TElts[] = { GetTagConstant(VMContext, DW_TAG_base_type) };
@ -1110,18 +1103,13 @@ DISubprogram DIBuilder::createFunction(DIDescriptor Context,
} }
/// createMethod - Create a new descriptor for the specified C++ method. /// createMethod - Create a new descriptor for the specified C++ method.
DISubprogram DIBuilder::createMethod(DIDescriptor Context, DISubprogram DIBuilder::createMethod(DIDescriptor Context, StringRef Name,
StringRef Name, StringRef LinkageName, DIFile F,
StringRef LinkageName,
DIFile F,
unsigned LineNo, DICompositeType Ty, unsigned LineNo, DICompositeType Ty,
bool isLocalToUnit, bool isLocalToUnit, bool isDefinition,
bool isDefinition,
unsigned VK, unsigned VIndex, unsigned VK, unsigned VIndex,
DIType VTableHolder, DIType VTableHolder, unsigned Flags,
unsigned Flags, bool isOptimized, Function *Fn,
bool isOptimized,
Function *Fn,
MDNode *TParam) { MDNode *TParam) {
assert(Ty.getTag() == dwarf::DW_TAG_subroutine_type && assert(Ty.getTag() == dwarf::DW_TAG_subroutine_type &&
"function types should be subroutines"); "function types should be subroutines");
@ -1137,7 +1125,7 @@ DISubprogram DIBuilder::createMethod(DIDescriptor Context,
Ty, Ty,
ConstantInt::get(Type::getInt1Ty(VMContext), isLocalToUnit), ConstantInt::get(Type::getInt1Ty(VMContext), isLocalToUnit),
ConstantInt::get(Type::getInt1Ty(VMContext), isDefinition), ConstantInt::get(Type::getInt1Ty(VMContext), isDefinition),
ConstantInt::get(Type::getInt32Ty(VMContext), (unsigned)VK), ConstantInt::get(Type::getInt32Ty(VMContext), VK),
ConstantInt::get(Type::getInt32Ty(VMContext), VIndex), ConstantInt::get(Type::getInt32Ty(VMContext), VIndex),
VTableHolder.getRef(), VTableHolder.getRef(),
ConstantInt::get(Type::getInt32Ty(VMContext), Flags), ConstantInt::get(Type::getInt32Ty(VMContext), Flags),