This is an archive of the discontinued LLVM Phabricator instance.

[clang][Interp] Fix parameter map when re-visiting function
ClosedPublic

Authored by tbaeder on Jan 13 2023, 5:29 AM.

Details

Summary
'Params' is a member of the ByteCodeEmitter. We only added the
parameters the first time  we saw the function, so subsequent visits
didn't work if they had (and used) parameters.

Just do the work everytime we see a function.

Diff Detail

Event Timeline

tbaeder created this revision.Jan 13 2023, 5:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 13 2023, 5:29 AM
tbaeder requested review of this revision.Jan 13 2023, 5:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 13 2023, 5:29 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
shafik accepted this revision.Jan 13 2023, 9:32 AM

LGTM

clang/lib/AST/Interp/ByteCodeEmitter.cpp
58

Where is Params used?

This revision is now accepted and ready to land.Jan 13 2023, 9:32 AM
tbaeder added inline comments.Jan 13 2023, 11:56 AM
clang/lib/AST/Interp/ByteCodeEmitter.cpp
58

In ByteCodeExprGen.h to emit GetParam{,Ptr} ops (which take the paramter offset as an argument).

This revision was landed with ongoing or failed builds.Mar 30 2023, 11:06 PM
This revision was automatically updated to reflect the committed changes.