]> granicus.if.org Git - clang/commitdiff
The type of the self and cmd variables should be artificial. (Note
authorEric Christopher <echristo@apple.com>
Tue, 11 Sep 2012 01:36:54 +0000 (01:36 +0000)
committerEric Christopher <echristo@apple.com>
Tue, 11 Sep 2012 01:36:54 +0000 (01:36 +0000)
that the types aren't artificial the args are, but this is currently
represented by an artificial type.)

Found by inspection.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163585 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGDebugInfo.cpp

index d1ccfe6944149720473a65de4c4ae9a820915126..c700f2f2002b487f077cd5831ecc0db20e8ecc0e 100644 (file)
@@ -1998,9 +1998,11 @@ llvm::DIType CGDebugInfo::getOrCreateFunctionType(const Decl * D,
     // First element is always return type. For 'void' functions it is NULL.
     Elts.push_back(getOrCreateType(OMethod->getResultType(), F));
     // "self" pointer is always first argument.
-    Elts.push_back(getOrCreateType(OMethod->getSelfDecl()->getType(), F));
+    llvm::DIType SelfTy = getOrCreateType(OMethod->getSelfDecl()->getType(), F);
+    Elts.push_back(DBuilder.createArtificialType(SelfTy));
     // "cmd" pointer is always second argument.
-    Elts.push_back(getOrCreateType(OMethod->getCmdDecl()->getType(), F));
+    llvm::DIType CmdTy = getOrCreateType(OMethod->getCmdDecl()->getType(), F);
+    Elts.push_back(DBuilder.createArtificialType(CmdTy));
     // Get rest of the arguments.
     for (ObjCMethodDecl::param_const_iterator PI = OMethod->param_begin(), 
            PE = OMethod->param_end(); PI != PE; ++PI)