[PATCH] D47248: [demangler] Add ItaniumPartialDemangler::isCtorOrDtor

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 22 23:22:43 PDT 2018


MaskRay created this revision.
MaskRay added reviewers: erik.pilkington, ruiu, echristo, pcc.
Herald added a subscriber: llvm-commits.

This feature can be used to implement gold compatible --icf=safe in LLD, which is used in some Android and Chrome builds.

In C++, ctors and dtors are not allowed to be taken addresses. This
property is exploited by gold --icf=safe to fold only ctors and dtors.
We don't need to be very precise here to catch all the cases,
false negatives would not hurt.


Repository:
  rL LLVM

https://reviews.llvm.org/D47248

Files:
  include/llvm/Demangle/Demangle.h
  lib/Demangle/ItaniumDemangle.cpp
  unittests/Demangle/PartialDemangleTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47248.148160.patch
Type: text/x-patch
Size: 3158 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180523/054d75ac/attachment.bin>


More information about the llvm-commits mailing list