This makes clang-cl able to build code which uses the gcc-defined __EXCEPTIONS macro for detecting whether -fno-exceptions has been passed to clang. cl.exe does not provide a similar way of disabling C++ exceptions, and never prefedines this variable.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
This looks good to me. As long as we don't have exceptions support, we shouldn't define this macro.
test/Frontend/exceptions.c | ||
---|---|---|
1 | I think '-x cl' says this file is OpenCL code. The test line should probably be: // RUN: %clang_cc1 -verify -fms-compatibility -fcxx-exceptions -fexceptions %s |
test/Frontend/exceptions.c | ||
---|---|---|
1 | Sorry, I should have caught that when reviewing. I did notice it when preparing to land Ehsan's patch though, so fixing it now. |
I think '-x cl' says this file is OpenCL code. The test line should probably be: