Skip to content

Commit 961b8ae

Browse files
committed
[Serialization] Only serialize SIL function generic env. with the body
When serializing a SIL function declaration only (no body), suppress the generic environment as well. This was the case previously, but I regressed it when moving the serialization of the generic environment to ID-based serialization in 69cc9f4. Fixes rdar://problem/29905180.
1 parent dad0526 commit 961b8ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Serialization/SerializeSIL.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ void SILSerializer::writeSILFunction(const SILFunction &F, bool DeclOnly) {
350350

351351
// If we have a body, we might have a generic environment.
352352
GenericEnvironmentID genericEnvID = 0;
353-
if (!F.isExternalDeclaration())
353+
if (!NoBody)
354354
genericEnvID = S.addGenericEnvironmentRef(F.getGenericEnvironment());
355355

356356
DeclID clangNodeOwnerID;

0 commit comments

Comments
 (0)