summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/CodeView
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2018-11-20 22:13:43 +0000
committerZachary Turner <zturner@google.com>2018-11-20 22:13:43 +0000
commitc68f895702958dda96bfc297a3bc491082c5269d (patch)
tree78ce4e99f44a5ce5e82ef0e5a77ae67e494958fa /llvm/lib/DebugInfo/CodeView
parent3826566c044e94f8c1e3d26c66f28a5545aab2bc (diff)
downloadbcm5719-llvm-c68f895702958dda96bfc297a3bc491082c5269d.tar.gz
bcm5719-llvm-c68f895702958dda96bfc297a3bc491082c5269d.zip
[CodeView] Add support for ref-qualified member functions.
When you have a member function with a ref-qualifier, for example: struct Foo { void Func() &; void Func2() &&; }; clang-cl was not emitting this information. Doing so is a bit awkward, because it's not a property of the LF_MFUNCTION type, which is what you'd expect. Instead, it's a property of the this pointer which is actually an LF_POINTER. This record has an attributes bitmask on it, and our handling of this bitmask was all wrong. We had some parts of the bitmask defined incorrectly, but importantly for this bug, we didn't know about these extra 2 bits that represent the ref qualifier at all. Differential Revision: https://reviews.llvm.org/D54667 llvm-svn: 347354
Diffstat (limited to 'llvm/lib/DebugInfo/CodeView')
-rw-r--r--llvm/lib/DebugInfo/CodeView/TypeDumpVisitor.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/CodeView/TypeDumpVisitor.cpp b/llvm/lib/DebugInfo/CodeView/TypeDumpVisitor.cpp
index f7afc068f2c..f5d3bea43a1 100644
--- a/llvm/lib/DebugInfo/CodeView/TypeDumpVisitor.cpp
+++ b/llvm/lib/DebugInfo/CodeView/TypeDumpVisitor.cpp
@@ -370,6 +370,8 @@ Error TypeDumpVisitor::visitKnownRecord(CVType &CVR, PointerRecord &Ptr) {
W->printNumber("IsVolatile", Ptr.isVolatile());
W->printNumber("IsUnaligned", Ptr.isUnaligned());
W->printNumber("IsRestrict", Ptr.isRestrict());
+ W->printNumber("IsThisPtr&", Ptr.isLValueReferenceThisPtr());
+ W->printNumber("IsThisPtr&&", Ptr.isRValueReferenceThisPtr());
W->printNumber("SizeOf", Ptr.getSize());
if (Ptr.isPointerToMember()) {
OpenPOWER on IntegriCloud