We end up dereferencing the end iterator here when the Aspect doesn't exist in the DefaultAction map.
Check for end iterator.
Details
Details
- Reviewers
t.p.northover ab qcolombet dsanders
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
include/llvm/CodeGen/GlobalISel/LegalizerInfo.h | ||
---|---|---|
159 | I'm not sure about this bit. Are the callers expecting to deal with an invalid LLT? |
Comment Actions
Updated the Patch to make the helper function return Optional<LLT> which the caller checks for validity.
Comment Actions
Hi Aditya,
LGTM with the optional update.
@dsanders Daniel, I believe it fixes your concern, right?
Cheers,
-Quentin
Comment Actions
Yep, LGTM.
One nit: We could avoid introducing the Optional<> by testing for LLT.isValid() instead of testing for whether the Optional has a value
I'm not sure about this bit. Are the callers expecting to deal with an invalid LLT?