[dragonegg] r178248 - Fix a crash due to recent extra sanity checking of debug info. Note that the
Duncan Sands
baldrick at free.fr
Thu Mar 28 09:48:48 PDT 2013
Author: baldrick
Date: Thu Mar 28 11:48:47 2013
New Revision: 178248
URL: http://llvm.org/viewvc/llvm-project?rev=178248&view=rev
Log:
Fix a crash due to recent extra sanity checking of debug info. Note that the
debug type now generated for OFFSET_TYPE might be wrong, but for sure the old
one was wrong.
Modified:
dragonegg/trunk/src/Debug.cpp
dragonegg/trunk/test/validator/c++/OffsetType.cpp
Modified: dragonegg/trunk/src/Debug.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Debug.cpp?rev=178248&r1=178247&r2=178248&view=diff
==============================================================================
--- dragonegg/trunk/src/Debug.cpp (original)
+++ dragonegg/trunk/src/Debug.cpp Thu Mar 28 11:48:47 2013
@@ -936,20 +936,13 @@ DIType DebugInfo::getOrCreateType(tree t
#if (GCC_MINOR > 5)
case NULLPTR_TYPE:
#endif
+ case OFFSET_TYPE:
case POINTER_TYPE:
case REFERENCE_TYPE:
// Do not cache pointer type. The pointer may point to forward declared
// struct.
return createPointerType(type);
- case OFFSET_TYPE: {
- // gen_type_die(TYPE_OFFSET_BASETYPE(type), context_die);
- // gen_type_die(TREE_TYPE(type), context_die);
- // gen_ptr_to_mbr_type_die(type, context_die);
- // PR 7104
- break;
- }
-
case FUNCTION_TYPE:
case METHOD_TYPE:
Ty = createMethodType(type);
Modified: dragonegg/trunk/test/validator/c++/OffsetType.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/test/validator/c%2B%2B/OffsetType.cpp?rev=178248&r1=178247&r2=178248&view=diff
==============================================================================
--- dragonegg/trunk/test/validator/c++/OffsetType.cpp (original)
+++ dragonegg/trunk/test/validator/c++/OffsetType.cpp Thu Mar 28 11:48:47 2013
@@ -14,3 +14,12 @@ struct AnyPtrMem {
void test_deduce_ptrmem_with_qual(AnyPtrMem apm) {
const float X::* pm = apm;
}
+
+struct A {
+ typedef A* (A::*MemberPointer);
+ A *m_ptr;
+};
+
+void foo() {
+ A::MemberPointer member = &A::m_ptr;
+}
More information about the llvm-commits
mailing list