From da174c1d3b1fa31d7c5c47a645c66d600b4b7bd8 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Fri, 3 Jun 2011 17:04:51 +0000 Subject: A typedef's context is not the same as type's context. It is the context of typedef decl itself. Use extra parameter to communicate this to DIBuilder. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132556 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/DIBuilder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Analysis/DIBuilder.cpp') diff --git a/lib/Analysis/DIBuilder.cpp b/lib/Analysis/DIBuilder.cpp index 1375e497ac..ef5d03a071 100644 --- a/lib/Analysis/DIBuilder.cpp +++ b/lib/Analysis/DIBuilder.cpp @@ -160,12 +160,12 @@ DIType DIBuilder::createReferenceType(DIType RTy) { /// createTypedef - Create debugging information entry for a typedef. DIType DIBuilder::createTypedef(DIType Ty, StringRef Name, DIFile File, - unsigned LineNo) { + unsigned LineNo, DIDescriptor Context) { // typedefs are encoded in DIDerivedType format. assert(Ty.Verify() && "Invalid typedef type!"); Value *Elts[] = { GetTagConstant(VMContext, dwarf::DW_TAG_typedef), - Ty.getContext(), + Context, MDString::get(VMContext, Name), File, ConstantInt::get(Type::getInt32Ty(VMContext), LineNo), -- cgit v1.2.3