This is an archive of the discontinued LLVM Phabricator instance.

[test] Allow libc++ namespaces besides `__1`
ClosedPublic

Authored by rupprecht on Jul 15 2022, 12:49 PM.

Details

Summary

The libc++ data formatter for std::shared_ptr allows any namespace, but the test asserts that it must be the default __1 namespace. Relax the regex to allow anything that looks like __.* (although we use __[^:]* so we don't match arbitrarily long text).

Diff Detail

Event Timeline

rupprecht created this revision.Jul 15 2022, 12:49 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 15 2022, 12:49 PM
rupprecht requested review of this revision.Jul 15 2022, 12:49 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 15 2022, 12:49 PM

Seems like there's another instance of this in TestForwardDeclFromStdModule.py.

rupprecht updated this revision to Diff 445115.Jul 15 2022, 1:12 PM

Seems like there's another instance of this in TestForwardDeclFromStdModule.py.

Added that one too.

There is also this one: https://github.com/llvm/llvm-project/blob/09531ede6d5622da68941902072dbca517d31318/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp#L222
But updating it didn't have the effect I was expecting, so there might be something more involved. I'll save that for a later patch.

Seems like there's another instance of this in TestForwardDeclFromStdModule.py.

Added that one too.

There is also this one: https://github.com/llvm/llvm-project/blob/09531ede6d5622da68941902072dbca517d31318/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp#L222
But updating it didn't have the effect I was expecting, so there might be something more involved. I'll save that for a later patch.

I looked at this one again and feeling more sure that it will be a more complicated fix. FindLibCppStdFunctionCallableInfo there is looking at __f_ and assuming the type looks like __value_func. However, when using unstable libc++ ABI (and IIUC std::__1 is an indication that unstable libc++ is *not* being used), that enables _LIBCPP_ABI_OPTIMIZED_FUNCTION which changes __f_ to __policy_func with an entirely different layout. The fact that it hard codes std::__1 is the least of its problems w.r.t using a non-vanilla libc++.

labath accepted this revision.Nov 29 2022, 2:01 AM
This revision is now accepted and ready to land.Nov 29 2022, 2:01 AM
This revision was landed with ongoing or failed builds.Nov 29 2022, 4:34 AM
This revision was automatically updated to reflect the committed changes.