This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Fix Windows build error in include/filesystem
ClosedPublic

Authored by thomasanderson on Jan 28 2019, 1:07 PM.

Details

Summary

_LIBCPP_FUNC_VIS is redundant since the class is already annotated with _LIBCPP_EXCEPTION_ABI.

Fixes this build error:

In file included from fstream:188:
filesystem(1350,3):  error: attribute 'dllimport' cannot be applied to member of 'dllimport' class
  _LIBCPP_FUNC_VIS
__config(674,37):  note: expanded from macro '_LIBCPP_FUNC_VIS'
#define _LIBCPP_FUNC_VIS            _LIBCPP_DLL_VIS
__config(666,38):  note: expanded from macro '_LIBCPP_DLL_VIS'
#  define _LIBCPP_DLL_VIS __declspec(dllimport)
filesystem(1313,7):  note: previous attribute is here
class _LIBCPP_EXCEPTION_ABI filesystem_error : public system_error {
__config(675,37):  note: expanded from macro '_LIBCPP_EXCEPTION_ABI'
#define _LIBCPP_EXCEPTION_ABI       _LIBCPP_DLL_VIS
__config(666,38):  note: expanded from macro '_LIBCPP_DLL_VIS'
#  define _LIBCPP_DLL_VIS __declspec(dllimport)

Diff Detail

Repository
rCXX libc++

Event Timeline

thomasanderson created this revision.Jan 28 2019, 1:07 PM

Wow formatting looks awful in the CL description. Is there a way I can disable formatting for a paragraph?

thomasanderson edited the summary of this revision. (Show Details)Jan 28 2019, 3:24 PM
EricWF accepted this revision.Jan 28 2019, 9:51 PM
This revision is now accepted and ready to land.Jan 28 2019, 9:51 PM
This revision was automatically updated to reflect the committed changes.