std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__recommend(unsigned long) is defined as _LIBCPP_INLINE_VISIBILITY which expands to __attribute__ ((__visibility__("hidden"), __always_inline__))
It seems like we are emitting call instructions that cannot be handled by the inliner at O0:
%69 = call i8 addrspace(200)* @llvm.cheri.cap.offset.set(i8 addrspace(200)* %68, i64 ptrtoint (i64 (i64)* @_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE11__recommendEm to i64))
Test case:
Results in
std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__recommend(unsigned long)
is defined as_LIBCPP_INLINE_VISIBILITY
which expands to__attribute__ ((__visibility__("hidden"), __always_inline__))
It seems like we are emitting call instructions that cannot be handled by the inliner at O0:
%69 = call i8 addrspace(200)* @llvm.cheri.cap.offset.set(i8 addrspace(200)* %68, i64 ptrtoint (i64 (i64)* @_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE11__recommendEm to i64))
The test links successfully at -O2.