[PATCH] D57189: Fix compatibility with the msvc AI compiler option

Zachary Henkel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 24 13:46:57 PST 2019


zahen created this revision.
zahen added reviewers: rnk, zturner.
Herald added a subscriber: cfe-commits.

The unsupported /AI option accepts directory paths in a manner similar to the supported /I option and allows spaces between the flag and the directory.  An example snippet from our production compile that broke on clang-cl.exe because it read the path as an input file.

  /AI %WindowsSdkDir%\References\%WindowsSDKVersion% /I %WindowsSdkDir%\Include\%WindowsSDKVersion%\winrt


Repository:
  rC Clang

https://reviews.llvm.org/D57189

Files:
  include/clang/Driver/CLCompatOptions.td


Index: include/clang/Driver/CLCompatOptions.td
===================================================================
--- include/clang/Driver/CLCompatOptions.td
+++ include/clang/Driver/CLCompatOptions.td
@@ -394,7 +394,7 @@
 
 // Unsupported:
 
-def _SLASH_AI : CLJoined<"AI">;
+def _SLASH_AI : CLJoinedOrSeparate<"AI">;
 def _SLASH_Bt : CLFlag<"Bt">;
 def _SLASH_Bt_plus : CLFlag<"Bt+">;
 def _SLASH_clr : CLJoined<"clr">;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57189.183384.patch
Type: text/x-patch
Size: 423 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190124/fa1c8c56/attachment-0001.bin>


More information about the cfe-commits mailing list