This is an archive of the discontinued LLVM Phabricator instance.

TargetLibraryInfo: Introduce wcslen
ClosedPublic

Authored by MatzeB on May 3 2017, 4:38 PM.

Details

Summary

wcslen is part of the C99 and C++98 standards.

  • This introduces the function to TargetLibraryInfo.
  • Also set attributes for wcslen in llvm::inferLibFuncAttributes().

This especially helps eliminating unnecessary exception landing pads in the std::wstring constructor which is often inlined.

Diff Detail

Repository
rL LLVM

Event Timeline

MatzeB created this revision.May 3 2017, 4:38 PM
MatzeB updated this revision to Diff 97870.May 4 2017, 1:17 PM
  • Add missing wcslen declaration to unittests/Analysis/TargetLibraryInfoTest.cpp
andrew.w.kaylor accepted this revision.May 5 2017, 8:48 AM

Looks good to me

This revision is now accepted and ready to land.May 5 2017, 8:48 AM
This revision was automatically updated to reflect the committed changes.