[llvm-commits] [llvm-gcc-4.2] r95462 - /llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
Devang Patel
dpatel at apple.com
Fri Feb 5 17:04:51 PST 2010
Author: dpatel
Date: Fri Feb 5 19:04:51 2010
New Revision: 95462
URL: http://llvm.org/viewvc/llvm-project?rev=95462&view=rev
Log:
Identify artificial arguments. e.g. "this" in c++.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp?rev=95462&r1=95461&r2=95462&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Fri Feb 5 19:04:51 2010
@@ -628,7 +628,15 @@
for (tree arg = TYPE_ARG_TYPES(type); arg; arg = TREE_CHAIN(arg)) {
tree formal_type = TREE_VALUE(arg);
if (formal_type == void_type_node) break;
- EltTys.push_back(getOrCreateType(formal_type));
+ llvm::DIType FormalType = getOrCreateType(formal_type);
+ if (TREE_CODE (type) == METHOD_TYPE
+ && TREE_CODE (formal_type) == POINTER_TYPE
+ && TREE_TYPE (formal_type) == TYPE_METHOD_BASETYPE (type)) {
+ DIType AFormalType = DebugFactory.CreateArtificialType(FormalType);
+ EltTys.push_back(AFormalType);
+ TypeCache[formal_type] = WeakVH(AFormalType.getNode());
+ } else
+ EltTys.push_back(FormalType);
}
llvm::DIArray EltTypeArray =
More information about the llvm-commits
mailing list