aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
diff options
context:
space:
mode:
authorAlex Zinenko <zinenko@google.com>2020-05-06 17:39:23 +0200
committerAlex Zinenko <zinenko@google.com>2020-05-06 20:40:32 +0200
commit26f93d9f373a1e638b621391ef7ba9bdf7b79044 (patch)
tree3300e4c6d87b99ad7c060382ea98d40c658ec0bc /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
parent1b678ee8a6cc7510801b7c5be2bcde08ff8bbd6e (diff)
downloadllvm-26f93d9f373a1e638b621391ef7ba9bdf7b79044.zip
llvm-26f93d9f373a1e638b621391ef7ba9bdf7b79044.tar.gz
llvm-26f93d9f373a1e638b621391ef7ba9bdf7b79044.tar.bz2
[mlir] OperationFolder: fix crash in creation of single-result-ops with in-place folds
When the folding is performed in place, the `::fold` function does not populate its `results` argument to indicate that. (In the folding hook for single-result operations, the result of the original operation is expected to be returned, but it is then ignored by the wrapper.) `OperationFolder::create` would erronously rely on the _operation_ having zero results instead of on the _folding_ producing zero new results to populate the list of results with those of the original operation. This would lead to a crash for single-result ops with in-place folds where the first result is accessed uncondtionally because the list of results was not properly populated. Use the list of values produced by the folding instead. Differential Revision: https://reviews.llvm.org/D79497
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
0 files changed, 0 insertions, 0 deletions