This is an archive of the discontinued LLVM Phabricator instance.

[flang][NFC] Remove link-time dependency of Evaluate on Semantics
ClosedPublic

Authored by tskeith on May 28 2020, 2:39 PM.

Details

Summary

Some Symbol-related functions used in Evaluate were moved to
Evaluate/tools.h. This includes changing some member functions that were
replaced by non-member functions IsDummy, GetUsedModule, and
CountLenParameters.

Some member functions were made inline in Scope, Symbol,
ArraySpec, and DeclTypeSpec. The definitions were preceded by a
comment explaining why they are inline.

IsConstantShape was expanded inline in IsDescriptor because it isn't
used anywhere else

After this change, at least when compiling with clang on macos,
libFortranEvaluate.a has no undefined symbols that are satisfied by
libFortranSemantics.a.

Diff Detail

Event Timeline

tskeith created this revision.May 28 2020, 2:39 PM
Herald added a project: Restricted Project. · View Herald Transcript
PeteSteinfeld accepted this revision.May 28 2020, 7:46 PM

Looks good to me. Everything builds and tests for me!

This revision is now accepted and ready to land.May 28 2020, 7:46 PM
This revision was automatically updated to reflect the committed changes.