[llvm-commits] [dragonegg] r104439 - /dragonegg/trunk/llvm-debug.cpp
Duncan Sands
baldrick at free.fr
Sat May 22 04:41:12 PDT 2010
Author: baldrick
Date: Sat May 22 06:41:12 2010
New Revision: 104439
URL: http://llvm.org/viewvc/llvm-project?rev=104439&view=rev
Log:
Port commit 103633 (dpatel) from llvm-gcc:
Handle pointer to data member directly.
Modified:
dragonegg/trunk/llvm-debug.cpp
Modified: dragonegg/trunk/llvm-debug.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-debug.cpp?rev=104439&r1=104438&r2=104439&view=diff
==============================================================================
--- dragonegg/trunk/llvm-debug.cpp (original)
+++ dragonegg/trunk/llvm-debug.cpp Sat May 22 06:41:12 2010
@@ -400,6 +400,8 @@
// Construct variable.
DIScope VarScope = DIScope(cast<MDNode>(RegionStack.back()));
DIType Ty = getOrCreateType(type);
+ if (!Ty && TREE_CODE(type) == OFFSET_TYPE)
+ Ty = createPointerType(TREE_TYPE(type));
if (DECL_ARTIFICIAL (decl))
Ty = DebugFactory.CreateArtificialType(Ty);
// If type info is not available then do not emit debug info for this var.
@@ -597,9 +599,8 @@
DIType FromTy = getOrCreateType(TREE_TYPE(type));
// type* and type&
// FIXME: Should BLOCK_POINTER_TYP have its own DW_TAG?
- unsigned Tag = TREE_CODE(type) == POINTER_TYPE ?
- DW_TAG_pointer_type :
- DW_TAG_reference_type;
+ unsigned Tag = TREE_CODE(type) == REFERENCE_TYPE ?
+ DW_TAG_reference_type: DW_TAG_pointer_type;
unsigned Flags = 0;
// Check if this pointer type has a name.
More information about the llvm-commits
mailing list