[PATCH] D122917: AttributorAttributes: guard against TLI being nullptr
Augie Fackler via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 3 20:19:44 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG603ae7314674: AttributorAttributes: guard against TLI being nullptr (authored by durin42).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122917/new/
https://reviews.llvm.org/D122917
Files:
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
Index: llvm/lib/Transforms/IPO/AttributorAttributes.cpp
===================================================================
--- llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+++ llvm/lib/Transforms/IPO/AttributorAttributes.cpp
@@ -5899,7 +5899,8 @@
if (nullptr != getInitialValueOfAllocation(CB, TLI, I8Ty)) {
AllocationInfo *AI = new (A.Allocator) AllocationInfo{CB};
AllocationInfos[CB] = AI;
- TLI->getLibFunc(*CB, AI->LibraryFunctionId);
+ if (TLI)
+ TLI->getLibFunc(*CB, AI->LibraryFunctionId);
}
}
return true;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122917.420099.patch
Type: text/x-patch
Size: 603 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220404/9727526f/attachment.bin>
More information about the llvm-commits
mailing list