Skip to content

Commit 64d2d39

Browse files
committed
IRGen: do not mark AFP as const
We were not marking the async function pointer as constant but adding it to the `.rdata` section which the Windows linker helped identify as a problem: we were adding data with "rw" to a section that is expected to be "rd". Marking the data as constant results in error propagation breaking (presumably due to failure to materialize parameters properly as bindiff'ing the Concurrency library indicates that the functions are nearly identical with some argument loads elided). This repairs the emission of read/write data into the readonly section.
1 parent 17f1cf9 commit 64d2d39

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

lib/IRGen/GenThunk.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,6 @@ llvm::Constant *IRGenModule::defineAsyncFunctionPointer(LinkEntity entity,
386386
auto asyncEntity = LinkEntity::forAsyncFunctionPointer(entity);
387387
auto *var = cast<llvm::GlobalVariable>(
388388
getAddrOfLLVMVariable(asyncEntity, init, DebugTypeInfo()));
389-
setTrueConstGlobal(var);
390389
return var;
391390
}
392391

0 commit comments

Comments
 (0)