[PATCH] D113633: [llvm] Add support for DW_TAG_immutable_type
Luís Ferreira via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 10 17:23:51 PST 2021
ljmf00 created this revision.
Herald added subscribers: dexonsmith, hiraditya.
ljmf00 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D113633
Files:
llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
llvm/lib/DWARFLinker/DWARFLinker.cpp
llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
llvm/lib/IR/Verifier.cpp
Index: llvm/lib/IR/Verifier.cpp
===================================================================
--- llvm/lib/IR/Verifier.cpp
+++ llvm/lib/IR/Verifier.cpp
@@ -1069,6 +1069,7 @@
N.getTag() == dwarf::DW_TAG_reference_type ||
N.getTag() == dwarf::DW_TAG_rvalue_reference_type ||
N.getTag() == dwarf::DW_TAG_const_type ||
+ N.getTag() == dwarf::DW_TAG_immutable_type ||
N.getTag() == dwarf::DW_TAG_volatile_type ||
N.getTag() == dwarf::DW_TAG_restrict_type ||
N.getTag() == dwarf::DW_TAG_atomic_type ||
Index: llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
===================================================================
--- llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
+++ llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
@@ -355,6 +355,7 @@
case DW_TAG_structure_type:
case DW_TAG_class_type:
case DW_TAG_enumeration_type:
+ case DW_TAG_immutable_type:
case DW_TAG_base_type:
case DW_TAG_namespace:
*/
Index: llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
===================================================================
--- llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
+++ llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
@@ -1107,6 +1107,7 @@
return PointerSize;
}
case DW_TAG_const_type:
+ case DW_TAG_immutable_type:
case DW_TAG_volatile_type:
case DW_TAG_restrict_type:
case DW_TAG_typedef: {
Index: llvm/lib/DWARFLinker/DWARFLinker.cpp
===================================================================
--- llvm/lib/DWARFLinker/DWARFLinker.cpp
+++ llvm/lib/DWARFLinker/DWARFLinker.cpp
@@ -124,6 +124,7 @@
case dwarf::DW_TAG_interface_type:
case dwarf::DW_TAG_unspecified_type:
case dwarf::DW_TAG_shared_type:
+ case dwarf::DW_TAG_immutable_type:
return true;
default:
break;
Index: llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
===================================================================
--- llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
+++ llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
@@ -155,7 +155,8 @@
if (Tag != dwarf::DW_TAG_member && Tag != dwarf::DW_TAG_typedef &&
Tag != dwarf::DW_TAG_const_type && Tag != dwarf::DW_TAG_volatile_type &&
- Tag != dwarf::DW_TAG_restrict_type && Tag != dwarf::DW_TAG_atomic_type)
+ Tag != dwarf::DW_TAG_restrict_type && Tag != dwarf::DW_TAG_atomic_type &&
+ Tag != dwarf::DW_TAG_immutable_type)
return DDTy->getSizeInBits();
DIType *BaseType = DDTy->getBaseType();
@@ -210,7 +211,9 @@
return true;
assert(T == dwarf::DW_TAG_typedef || T == dwarf::DW_TAG_const_type ||
T == dwarf::DW_TAG_volatile_type ||
- T == dwarf::DW_TAG_restrict_type || T == dwarf::DW_TAG_atomic_type);
+ T == dwarf::DW_TAG_restrict_type ||
+ T == dwarf::DW_TAG_atomic_type ||
+ T == dwarf::DW_TAG_immutable_type);
assert(DTy->getBaseType() && "Expected valid base type");
return isUnsignedDIType(DTy->getBaseType());
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113633.386368.patch
Type: text/x-patch
Size: 3025 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211111/ec8b5dcf/attachment.bin>
More information about the llvm-commits
mailing list