This is an archive of the discontinued LLVM Phabricator instance.

[flang][NFC] Refactor derived type instantiation
ClosedPublic

Authored by tskeith on Apr 22 2020, 3:29 PM.

Details

Summary

Move InstantiateComponent and InstantiateIntrinsicType from symbol.cpp
to type.cpp as that is where they are called.

Put both in InstantiateHelper class to better isolate them.
Add CreateDerivedTypeSpec in InstantiateHelper.

Add non-const forms for AsIntrinsic and AsDerived to avoid const_cast.

No functional changes.

Diff Detail

Event Timeline

tskeith created this revision.Apr 22 2020, 3:29 PM
Herald added a project: Restricted Project. · View Herald Transcript
tskeith edited projects, added Restricted Project; removed Restricted Project.
Herald added a project: Restricted Project. · View Herald Transcript
klausler accepted this revision.Apr 22 2020, 4:09 PM
This revision is now accepted and ready to land.Apr 22 2020, 4:09 PM
This revision was automatically updated to reflect the committed changes.