aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2019-11-26 16:36:09 +0100
committerPavel Labath <pavel@labath.sk>2019-12-05 12:44:51 +0100
commitc16f0b18c13e88fedaa510bc2442bb693a6230c8 (patch)
tree434875333966709e9da95bde41d62e8ab99f52ae /clang/lib/Frontend/CompilerInvocation.cpp
parent4ee76a922aad743818d56f58630cf8da25602251 (diff)
downloadllvm-c16f0b18c13e88fedaa510bc2442bb693a6230c8.zip
llvm-c16f0b18c13e88fedaa510bc2442bb693a6230c8.tar.gz
llvm-c16f0b18c13e88fedaa510bc2442bb693a6230c8.tar.bz2
[lldb/cpluspluslanguage] Add constructor substitutor
Summary: This patch adds code which will substitute references to the full object constructors/destructors with their base object versions. Like all substitutions in this category, this operation is not really sound, but doing this in a more precise way allows us to get rid of a much larger hack -- matching function according to their demangled names, which effectively does the same thing, but also much more. This is a (very late) follow-up to D54074. Background: clang has an optimization which can eliminate full object structors completely, if they are found to be equivalent to their base object versions. It does this because it assumes they can be regenerated on demand in the compile unit that needs them (e.g., because they are declared inline). However, this doesn't work for the debugging scenario, where we don't have the structor bodies available -- we pretend all constructors are defined out-of-line as far as clang is concerned. This causes clang to emit references to the (nonexisting) full object structors during expression evaluation. Fun fact: This is not a problem on darwin, because the relevant optimization is disabled to work around a linker bug. Reviewers: teemperor, JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70721
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions