Author: hans Date: Thu Aug 8 14:54:30 2013 New Revision: 188000 URL: http://llvm.org/viewvc/llvm-project?rev=188000&view=rev Log: clang-cl: use MS C++ ABI
Differential Revision: http://llvm-reviews.chandlerc.com/D1329 Modified: cfe/trunk/lib/Driver/Tools.cpp cfe/trunk/test/Driver/cl.c Modified: cfe/trunk/lib/Driver/Tools.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=188000&r1=187999&r2=188000&view=diff ============================================================================== --- cfe/trunk/lib/Driver/Tools.cpp (original) +++ cfe/trunk/lib/Driver/Tools.cpp Thu Aug 8 14:54:30 2013 @@ -3723,6 +3723,10 @@ void Clang::AddClangCLArgs(const ArgList // users want. The /Za flag to cl.exe turns this off, but it's not // implemented in clang. CmdArgs.push_back("--dependent-lib=oldnames"); + + // FIXME: Make this default for the win32 triple. + CmdArgs.push_back("-cxx-abi"); + CmdArgs.push_back("microsoft"); } void ClangAs::ConstructJob(Compilation &C, const JobAction &JA, Modified: cfe/trunk/test/Driver/cl.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cl.c?rev=188000&r1=187999&r2=188000&view=diff ============================================================================== --- cfe/trunk/test/Driver/cl.c (original) +++ cfe/trunk/test/Driver/cl.c Thu Aug 8 14:54:30 2013 @@ -5,6 +5,9 @@ // expand the ? into a one-letter filename in the root directory, and make // the test fail is such a file or directory exists. +// Note: %s must be preceded by --, otherwise it may be interpreted as a +// command-line option, e.g. on Mac where %s is commonly under /Users. + // Check that clang-cl options are not available by default. // RUN: %clang -help | FileCheck %s -check-prefix=DEFAULT // DEFAULT-NOT: CL.EXE COMPATIBILITY OPTIONS @@ -26,3 +29,6 @@ // are not available in clang-cl. // DEFAULT: -fapple-kext // CL-NOT: -fapple-kext + +// RUN: %clang_cl /c -### -- %s 2>&1 | FileCheck -check-prefix=ABI %s +// ABI: "-cxx-abi" "microsoft" _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
