[dragonegg] r176263 - Debug info for OFFSET_TYPE was completely not working due to a "typo". This
Duncan Sands
baldrick at free.fr
Thu Feb 28 07:28:29 PST 2013
Author: baldrick
Date: Thu Feb 28 09:28:29 2013
New Revision: 176263
URL: http://llvm.org/viewvc/llvm-project?rev=176263&view=rev
Log:
Debug info for OFFSET_TYPE was completely not working due to a "typo". This
was exposed by the extra checking done by the recent debug info improvements.
Added:
dragonegg/trunk/test/validator/c++/OffsetType.cpp
Modified:
dragonegg/trunk/src/Debug.cpp
Modified: dragonegg/trunk/src/Debug.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Debug.cpp?rev=176263&r1=176262&r2=176263&view=diff
==============================================================================
--- dragonegg/trunk/src/Debug.cpp (original)
+++ dragonegg/trunk/src/Debug.cpp Thu Feb 28 09:28:29 2013
@@ -372,7 +372,7 @@ void DebugInfo::EmitDeclare(tree decl, u
DIScope VarScope = DIScope(cast<MDNode>(RegionStack.back()));
DIType Ty = getOrCreateType(type);
if (!Ty && isa<OFFSET_TYPE>(type))
- Ty = createPointerType(TREE_TYPE(type));
+ Ty = createPointerType(type);
if (Ty && DECL_ARTIFICIAL(decl))
Ty = DebugFactory.CreateArtificialType(Ty);
// If type info is not available then do not emit debug info for this var.
Added: dragonegg/trunk/test/validator/c++/OffsetType.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/test/validator/c%2B%2B/OffsetType.cpp?rev=176263&view=auto
==============================================================================
--- dragonegg/trunk/test/validator/c++/OffsetType.cpp (added)
+++ dragonegg/trunk/test/validator/c++/OffsetType.cpp Thu Feb 28 09:28:29 2013
@@ -0,0 +1,16 @@
+// RUN: %dragonegg -S -g %s
+
+struct X { };
+
+struct AnyPtrMem {
+ template<typename Class, typename T>
+ operator T Class::*() const
+ {
+ T x = 0;
+ return 0;
+ }
+};
+
+void test_deduce_ptrmem_with_qual(AnyPtrMem apm) {
+ const float X::* pm = apm;
+}
More information about the llvm-commits
mailing list