Skip to content
Commit 81cfb90f authored by Craig Topper's avatar Craig Topper
Browse files

[IR] Add a few asserts to provide a better failure signature if you try to...

[IR] Add a few asserts to provide a better failure signature if you try to create a load/store/alloca with no alignment or insertion position

If no alignment is specified we try to find the datalayout by using the insert position to get the module so we can get the datalayout. But if those are null, then we deference a null pointer.

This patch adds asserts to make the failure a little more obvious than just seg faulting.

Differential Revision: https://reviews.llvm.org/D83829
parent 71292379
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment