Skip to content

Commit 10b43e1

Browse files
author
Wenzel Jakob
committed
Revert "incorporate feedback"
This reverts commit eecf6af.
1 parent eecf6af commit 10b43e1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

llvm/lib/ExecutionEngine/Orc/LLJIT.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -951,9 +951,10 @@ LLJIT::createObjectLinkingLayer(LLJITBuilderState &S, ExecutionSession &ES) {
951951
// If the config state provided an ObjectLinkingLayer factory then use it.
952952
if (S.CreateObjectLinkingLayer) {
953953
auto Layer = S.CreateObjectLinkingLayer(ES);
954-
if (S.JTMB->getTargetTriple().isOSBinFormatCOFF()) {
955-
if (auto *RTDyldLayer =
956-
dyn_cast<RTDyldObjectLinkingLayer>(Layer->get())) {
954+
if (Layer && S.JTMB->getTargetTriple().isOSBinFormatCOFF()) {
955+
auto *RTDyldLayer =
956+
dyn_cast_or_null<RTDyldObjectLinkingLayer>(Layer.get().get());
957+
if (RTDyldLayer) {
957958
RTDyldLayer->setOverrideObjectFlagsWithResponsibilityFlags(true);
958959
RTDyldLayer->setAutoClaimResponsibilityForObjectSymbols(true);
959960
}

0 commit comments

Comments
 (0)