Skip to content
Commit d8a6deab authored by Reid Kleckner's avatar Reid Kleckner Committed by Hans Wennborg
Browse files

Fix MSVC build with C++ EH enabled

Mark the CrashRecoveryContextImpl constructor noexcept, so that MSVC
won't emit an unwind helper to clean up the allocation from `new` if the
constructor throws an exception.

Otherwise, MSVC complains:
  llvm\lib\Support\CrashRecoveryContext.cpp(220): error C2712: \
  Cannot use __try in functions that require object unwinding

The other simple fix would be to wrap `new` in a static helper or
lambda.

Users have reported that Tensorflow builds LLVM with /EHsc.

(cherry picked from commit a349c091)
parent 3c94b278
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment