This is an archive of the discontinued LLVM Phabricator instance.

[flang] Lower addresses inside global initializers in HLFIR
ClosedPublic

Authored by jeanPerier on Jan 9 2023, 5:18 AM.

Details

Summary

Move the code to lower an expression to address or a box in HLFIR from
Bridge.cpp to ConvertExpr.cpp so that it can be used inside
ConvertVariable.cpp (that needs to use a different symbol map that the
one held in the bridge).

Lower NULL to hlfir.null.

This allows lowering derived type constant structure constructors with
pointer components into fir.global.

Depends on D141136

Diff Detail

Event Timeline

jeanPerier created this revision.Jan 9 2023, 5:18 AM
Herald added a project: Restricted Project. · View Herald Transcript
jeanPerier requested review of this revision.Jan 9 2023, 5:18 AM
jeanPerier updated this revision to Diff 487428.Jan 9 2023, 7:25 AM

Format file correctly after git conflict resolution.

PeteSteinfeld accepted this revision.Jan 9 2023, 7:37 AM

All builds and tests correctly and looks good.

This revision is now accepted and ready to land.Jan 9 2023, 7:37 AM