This is an archive of the discontinued LLVM Phabricator instance.

[fir] Add character utility functions in FIRBuilder
ClosedPublic

Authored by clementval on Oct 19 2021, 7:20 AM.

Details

Summary

Extract part of D111337 in order to mke it smaller
and easier to review. This patch add some utility
functions to the FIRBuilder.

Add the following utility functions:

  • getCharacterLengthType
  • createStringLiteral
  • locationToFilename
  • characterWithDynamicLen
  • sequenceWithNonConstantShape
  • hasDynamicSize

These bring up the BoxValue implementation together with it.

This patch is part of the upstreaming effort from fir-dev branch.

Diff Detail

Event Timeline

clementval created this revision.Oct 19 2021, 7:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 19 2021, 7:20 AM
clementval requested review of this revision.Oct 19 2021, 7:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 19 2021, 7:20 AM
AlexisPerry accepted this revision.Oct 19 2021, 12:23 PM

LGTM, apart from a few minor typos in various comments.

flang/include/flang/Optimizer/Builder/BoxValue.h
114

Nit: Typo - should be "is"

350

Nit: Typo - should be "have"

358

Nit: Typo - should be "variables"

flang/include/flang/Optimizer/Builder/FIRBuilder.h
278

Nit: Typo - should be "and"

This revision is now accepted and ready to land.Oct 19 2021, 12:23 PM
clementval marked 4 inline comments as done.

Fix typos

This revision was automatically updated to reflect the committed changes.