[llvm-commits] [llvm-gcc-4.2] r103633 - /llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
Devang Patel
dpatel at apple.com
Wed May 12 11:30:15 PDT 2010
Author: dpatel
Date: Wed May 12 13:30:15 2010
New Revision: 103633
URL: http://llvm.org/viewvc/llvm-project?rev=103633&view=rev
Log:
Handle pointer to data member directly.
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=103633&r1=103632&r2=103633&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Wed May 12 13:30:15 2010
@@ -457,6 +457,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.
@@ -684,10 +686,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 ||
- TREE_CODE(type) == BLOCK_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;
if (type_is_block_byref_struct(type))
Flags |= llvm::DIType::FlagBlockByrefStruct;
More information about the llvm-commits
mailing list