This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Replace remaining _LIBCPP_INLINE_VISIBILITY in __support
ClosedPublic

Authored by brad on Jul 15 2022, 11:25 PM.

Details

Summary

Replace remaining _LIBCPP_INLINE_VISIBILITY in __support with _LIBCPP_HIDE_FROM_ABI.

Diff Detail

Event Timeline

brad created this revision.Jul 15 2022, 11:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 15 2022, 11:25 PM
brad requested review of this revision.Jul 15 2022, 11:25 PM
Herald added 1 blocking reviewer(s): Restricted Project. · View Herald TranscriptJul 15 2022, 11:25 PM
Mordante accepted this revision.Jul 16 2022, 10:05 AM

Thanks for the cleanup, LGTM!

This revision is now accepted and ready to land.Jul 16 2022, 10:05 AM
phosek added a subscriber: phosek.Jul 17 2022, 3:22 PM

We started seeing compile errors after this change when targeting Fuchsia:

/b/s/w/ir/cache/goma/client/gomacc /b/s/w/ir/x/w/staging/llvm_build/./bin/clang++ --target=x86_64-unknown-fuchsia --sysroot=/b/s/w/ir/x/w/cipd/sdk/arch/x64/sysroot -DLIBCXX_BUILDING_LIBCXXABI -D_LIBCPP_BUILDING_LIBRARY -D_LIBCPP_DISABLE_NEW_DELETE_DEFINITIONS -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/s/w/ir/x/w/llvm-llvm-project/libcxx/src -I/b/s/w/ir/x/w/staging/llvm_build/include/c++/v1 -I/b/s/w/ir/x/w/staging/llvm_build/include/x86_64-unknown-fuchsia/c++/v1 -I/b/s/w/ir/x/w/llvm-llvm-project/libcxxabi/include --target=x86_64-unknown-fuchsia -I/b/s/w/ir/x/w/cipd/sdk/pkg/sync/include -I/b/s/w/ir/x/w/cipd/sdk/pkg/fdio/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -Wmisleading-indentation -ffunction-sections -fdata-sections -ffile-prefix-map=/b/s/w/ir/x/w/staging/llvm_build/runtimes/runtimes-x86_64-unknown-fuchsia-bins=../staging/llvm_build/runtimes/runtimes-x86_64-unknown-fuchsia-bins -ffile-prefix-map=/b/s/w/ir/x/w/llvm-llvm-project/= -no-canonical-prefixes -O2 -g  -fPIC -UNDEBUG -faligned-allocation -nostdinc++ -fvisibility-inlines-hidden -fvisibility=hidden -Wall -Wextra -W -Wwrite-strings -Wno-unused-parameter -Wno-long-long -Werror=return-type -Wextra-semi -Wundef -Wformat-nonliteral -Wno-user-defined-literals -Wno-covered-switch-default -Wno-suggest-override -Wno-error -std=c++20 -MD -MT libcxx/src/CMakeFiles/cxx_shared.dir/ios.cpp.obj -MF libcxx/src/CMakeFiles/cxx_shared.dir/ios.cpp.obj.d -o libcxx/src/CMakeFiles/cxx_shared.dir/ios.cpp.obj -c /b/s/w/ir/x/w/llvm-llvm-project/libcxx/src/ios.cpp
In file included from /b/s/w/ir/x/w/llvm-llvm-project/libcxx/src/ios.cpp:10:
In file included from /b/s/w/ir/x/w/staging/llvm_build/include/c++/v1/__locale:39:
In file included from /b/s/w/ir/x/w/staging/llvm_build/include/c++/v1/__support/fuchsia/xlocale.h:18:
/b/s/w/ir/x/w/staging/llvm_build/include/c++/v1/__support/xlocale/__strtonum_fallback.h:22:34: error: cannot combine with previous 'int' declaration specifier
inline _LIBCPP_HIDE_FROM_ABI int float
                                 ^
/b/s/w/ir/x/w/staging/llvm_build/include/c++/v1/__support/xlocale/__strtonum_fallback.h:27:34: error: cannot combine with previous 'int' declaration specifier
inline _LIBCPP_HIDE_FROM_ABI int double
                                 ^
/b/s/w/ir/x/w/staging/llvm_build/include/c++/v1/__support/xlocale/__strtonum_fallback.h:32:39: error: cannot combine with previous 'int' declaration specifier
inline _LIBCPP_HIDE_FROM_ABI int long double
                                      ^
/b/s/w/ir/x/w/staging/llvm_build/include/c++/v1/__support/xlocale/__strtonum_fallback.h:57:39: error: cannot combine with previous 'int' declaration specifier
inline _LIBCPP_HIDE_FROM_ABI int long double
                                      ^
4 errors generated.

Would it be possible to take a look?

brad added a comment.Jul 17 2022, 6:26 PM

Would it be possible to take a look?

I'm sorry. I see the obvious mistake now.

Sorry I missed that in the review too.

gulfem added a subscriber: gulfem.Jul 18 2022, 6:09 AM

Would it be possible to take a look?

I'm sorry. I see the obvious mistake now.

Could we please revert it until the issue is fixed because this breaks our builds?

Would it be possible to take a look?

I'm sorry. I see the obvious mistake now.

Could we please revert it until the issue is fixed because this breaks our builds?

It should be fixed by D129978 which has landed shortly after your request.

Note that per LLVM policy you're free to revert breaking commits. This is not to put a burden on you, but not every developer is in the same timezone so it might take some time for the original author to see the issue their patch caused.

Would it be possible to take a look?

I'm sorry. I see the obvious mistake now.

Could we please revert it until the issue is fixed because this breaks our builds?

It should be fixed by D129978 which has landed shortly after your request.

Note that per LLVM policy you're free to revert breaking commits. This is not to put a burden on you, but not every developer is in the same timezone so it might take some time for the original author to see the issue their patch caused.

Thank you very much @Mordante. I was under the impression that a quick fix is on the way, so that's why I did not immediately revert it.

Note that per LLVM policy you're free to revert breaking commits. This is not to put a burden on you, but not every developer is in the same timezone so it might take some time for the original author to see the issue their patch caused.

Thank you very much @Mordante. I was under the impression that a quick fix is on the way, so that's why I did not immediately revert it.

No problem. I didn't know whether you knew this part of the policy. At first I felt the policy was odd, but I've really started to appreciate it, especially due to the timezone differences. (However I prefer not to introduce bugs ;-) )