[all-commits] [llvm/llvm-project] 81cfb9: [IR] Add a few asserts to provide a better failure...
topperc via All-commits
all-commits at lists.llvm.org
Tue Jul 14 18:48:40 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 81cfb90f858e510ec5c570a264fe57203e96a193
https://github.com/llvm/llvm-project/commit/81cfb90f858e510ec5c570a264fe57203e96a193
Author: Craig Topper <craig.topper at intel.com>
Date: 2020-07-14 (Tue, 14 Jul 2020)
Changed paths:
M llvm/lib/IR/Instructions.cpp
Log Message:
-----------
[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
More information about the All-commits
mailing list