[PATCH] D25669: [Driver] Simplify ToolChain::GetCXXStdlibType (NFC)

Michał Górny via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 17 08:44:34 PDT 2016


mgorny added a comment.

Thanks for working on this. Your code is much cleaner ;-).



================
Comment at: lib/Driver/ToolChain.cpp:553
 
-  // If no argument was provided or its value was invalid, look for the
-  // default unless forced or configured to take the platform default.
-  if (!HasValidType && (ForcePlatformDefault ||
-      !ParseCXXStdlibType(CLANG_DEFAULT_CXX_STDLIB, Type)))
-    Type = GetDefaultCXXStdlibType();
+  // "platform" is only used in tests to override CLANG_DEFAULT_CXX_STDLIB
+  if (LibName == "libc++")
----------------
ABataev wrote:
> I believe you can use StringSwitch here
I think you are changing the meaning of this comment. The original sounded like a request not to use this type anywhere else. Your version only explains where it's used (right now).


https://reviews.llvm.org/D25669





More information about the cfe-commits mailing list