Skip to content

Commit

Permalink
[Attributor] Initialize effectively unused value to appease UBSAN
Browse files Browse the repository at this point in the history
  • Loading branch information
jdoerfert committed Jul 20, 2021
1 parent 191f9fa commit d62bbbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/Transforms/IPO/AttributorAttributes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5144,7 +5144,7 @@ struct AAValueSimplifyImpl : AAValueSimplify {
if (isa<ConstantPointerNull>(Obj)) {
// A null pointer access can be undefined but any offset from null may
// be OK. We do not try to optimize the latter.
bool UsedAssumedInformation;
bool UsedAssumedInformation = false;
if (!NullPointerIsDefined(L.getFunction(),
Ptr.getType()->getPointerAddressSpace()) &&
A.getAssumedSimplified(Ptr, AA, UsedAssumedInformation) == Obj)
Expand Down

0 comments on commit d62bbbe

Please sign in to comment.