aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2017-11-15 01:33:46 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2017-11-15 01:33:46 +0000
commit85567ddabac0080d53f88f4f4a0ad828aef63f48 (patch)
treea9c1b0208a713426065f746abcfa8bd284d891d7 /llvm/lib/CodeGen/MachineFunction.cpp
parent4cb7d78130719390849486b0dee1ed01fba4b033 (diff)
downloadllvm-85567ddabac0080d53f88f4f4a0ad828aef63f48.zip
llvm-85567ddabac0080d53f88f4f4a0ad828aef63f48.tar.gz
llvm-85567ddabac0080d53f88f4f4a0ad828aef63f48.tar.bz2
[modules] Fix crash in complex class merging scenario.
When we merge together class definitions, we can end up with the canonical declaration of a field not being the one that was lexically within the canonical definition of the class. Additionally, when we merge class definitions via update records (eg, for a template specialization whose declaration is instantiated in one module and whose definition is instantiated in multiple others), we can end up with the list of lexical contents for the class not including a particular declaration of a field whose lexical parent is that class definition. In the worst case, we have a field whose canonical declaration's lexical parent has no fields, and in that case this attempt to number the fields by walking the fields in the declaration of the class that contained one of the canonical fields will fail. Instead, when numbering fields in a class, do the obvious thing: walk the fields in the definition. I'm still trying to reduce a testcase; the setup that leads to the above scenario seems to be quite fragile. llvm-svn: 318245
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions