From: Devang Patel Date: Fri, 3 Jun 2011 17:23:47 +0000 (+0000) Subject: Simplify. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c490312704c87841c2f9646478ff4d93c3bc90f1;p=clang Simplify. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132560 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 7f81d30c67..98d30db647 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -555,10 +555,12 @@ llvm::DIType CGDebugInfo::CreateType(const TypedefType *Ty, // We don't set size information, but do specify where the typedef was // declared. unsigned Line = getLineNumber(Ty->getDecl()->getLocation()); - llvm::DIType DbgTy = - DBuilder.createTypedef(Src, Ty->getDecl()->getName(), Unit, Line, - getContextDescriptor(cast(Ty->getDecl()->getDeclContext()))); - return DbgTy; + const TypedefNameDecl *TyDecl = Ty->getDecl(); + llvm::DIDescriptor TydefContext = + getContextDescriptor(cast(Ty->getDecl()->getDeclContext())); + + return + DBuilder.createTypedef(Src, TyDecl->getName(), Unit, Line, TydefContext); } llvm::DIType CGDebugInfo::CreateType(const FunctionType *Ty,