Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
structmemfunclowering: fix crash when gep is optimized away
LLVM is smart enough to be able to fold a gep if the source and indices are constants. However, it was assumed that it would always emit a gep instruction, which would cause a crash when trying to cast it. Upon further inspection, I believe that the surrounding if statement was meant as a way of working around one of such folds. The new code should work for the general case, so I've removed it. This fixes: leaningtech/cheerp-meta#141
- Loading branch information