This is an archive of the discontinued LLVM Phabricator instance.

[lldb] fix dangling reference in `ClangHost.cpp`
ClosedPublic

Authored by paperchalice on Jun 5 2023, 9:16 PM.

Details

Summary

The lifetime of clang_resource_path should be same as kResourceDirSuffixes, because kResourceDirSuffixes doesn't own clang_resource_path.

Diff Detail

Event Timeline

paperchalice created this revision.Jun 5 2023, 9:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 5 2023, 9:16 PM
paperchalice requested review of this revision.Jun 5 2023, 9:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 5 2023, 9:16 PM
paperchalice retitled this revision from [lldb] mark `clang_resource_path` as static to [lldb] fix dangling reference in `ClangHost.cpp`.Jun 6 2023, 5:41 AM
paperchalice added reviewers: mib, bulbazord.

If this patch fixes the CI failure, I need someone to commit this change, thanks in advance.

aprantl accepted this revision.Jun 6 2023, 8:09 AM
This revision is now accepted and ready to land.Jun 6 2023, 8:09 AM
This revision was automatically updated to reflect the committed changes.

Thanks!

FWIW, it seems like an unnecessary micro optimization to make both these variables static.