[PATCH] D28365: [Driver] Updated for Visual Studio 2017

Hamza Sood via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 6 17:40:34 PST 2017


hamzasood updated this revision to Diff 83473.
hamzasood added a comment.

- Modify the environment in some cases in buildLinker to keep link.exe happy.

Thanks @rnk for taking the time to look at this. As suggested:

- Replaced the confusing unique_ptr usage with a struct.
- Renamed llvmArchToSubDirectoryName to llvmArchToWindowsSDKArch.
- Replaced the nested function in getSubDirectoryPath with a static helper.

With regard to _set_com_error_handler, it's a documented <https://msdn.microsoft.com/en-us/library/ff357023(v=vs.90).aspx> function so it is supported. It's not part of the actual COM API, just a wrapper library that sits on top of it. That library is a header only library with inline functions, so you can see how it's used. It checks the HRESULTs before returning them and if the result isn't successful then it calls the error handler; the original HRESULT still gets returned afterwards. You can also see from the headers that it isn't being relied on to process any kind of internal error, so it should be perfectly safe to block out for a bit.


https://reviews.llvm.org/D28365

Files:
  include/clang/Basic/DiagnosticDriverKinds.td
  lib/Driver/MSVCToolChain.cpp
  lib/Driver/ToolChains.h
  lib/Driver/Tools.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28365.83473.patch
Type: text/x-patch
Size: 32365 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170107/222effd4/attachment-0001.bin>


More information about the cfe-commits mailing list