Simplify.
llvm-svn: 128957
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 2227341..1efd82e 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -655,9 +655,7 @@
if (!Method->isStatic())
{
// "this" pointer is always first argument.
- ASTContext &Context = CGM.getContext();
- QualType ThisPtr =
- Context.getPointerType(Context.getTagDeclType(Method->getParent()));
+ QualType ThisPtr = Method->getThisType(CGM.getContext());
llvm::DIType ThisPtrType =
DBuilder.createArtificialType(getOrCreateType(ThisPtr, Unit));