]> granicus.if.org Git - clang/commitdiff
Simplify.
authorDevang Patel <dpatel@apple.com>
Fri, 3 Jun 2011 17:23:47 +0000 (17:23 +0000)
committerDevang Patel <dpatel@apple.com>
Fri, 3 Jun 2011 17:23:47 +0000 (17:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132560 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGDebugInfo.cpp

index 7f81d30c67704c0b2bf1266e377e56358e60ffa5..98d30db647d557ce8d40b51d9879fe60ad4d3e67 100644 (file)
@@ -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<Decl>(Ty->getDecl()->getDeclContext())));
-  return DbgTy;
+  const TypedefNameDecl *TyDecl = Ty->getDecl();
+  llvm::DIDescriptor TydefContext =
+    getContextDescriptor(cast<Decl>(Ty->getDecl()->getDeclContext()));
+
+  return  
+    DBuilder.createTypedef(Src, TyDecl->getName(), Unit, Line, TydefContext);
 }
 
 llvm::DIType CGDebugInfo::CreateType(const FunctionType *Ty,