llvm-project
4aaa9257 - [llvm][CodeExtractor] fix bug in parameter naming (#114237)

Commit
1 year ago
[llvm][CodeExtractor] fix bug in parameter naming (#114237) The code extractor tries to apply the names of source input and output values to function arguments. Not all input and output values get added as arguments: some are instead placed inside of a struct passed to the function. The existing renaming code skipped trying to set these struct-packed arguments names (as there is no corresponding function argument to rename), but it still incremented the iterator over the function arguments. This could result in dereferencing an end iterator if struct-packed inputs/outputs preceded non-struct-packed inputs/outputs. This patch rewrites this loop to avoid the end iterator dereference.
Author
Parents
Loading