diff options
author | Zachary Turner <zturner@google.com> | 2018-11-20 22:13:23 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2018-11-20 22:13:23 +0000 |
commit | 3826566c044e94f8c1e3d26c66f28a5545aab2bc (patch) | |
tree | 205198e12d6d4852395b0e97c45baecdc0112dc2 /llvm/lib/CodeGen/AsmPrinter | |
parent | 8e9baa3f17c8e54906cbffbede6f9587fe01a8c3 (diff) | |
download | bcm5719-llvm-3826566c044e94f8c1e3d26c66f28a5545aab2bc.tar.gz bcm5719-llvm-3826566c044e94f8c1e3d26c66f28a5545aab2bc.zip |
[CodeView] Mark this pointers as const.
This is for compatibility with MSVC, which also marks this pointers
as being const-qualified.
Fixes llvm.org/pr36526
Differential Revision: https://reviews.llvm.org/D54736
llvm-svn: 347353
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp index 3b1fd76638e..59056b0ff5d 100644 --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -1715,6 +1715,9 @@ TypeIndex CodeViewDebug::lowerTypePointer(const DIDerivedType *Ty, break; } + if (Ty->isObjectPointer()) + PO |= PointerOptions::Const; + PointerRecord PR(PointeeTI, PK, PM, PO, Ty->getSizeInBits() / 8); return TypeTable.writeLeafType(PR); } |