[all-commits] [llvm/llvm-project] d8a6de: Fix MSVC build with C++ EH enabled
Reid Kleckner via All-commits
all-commits at lists.llvm.org
Wed Feb 12 02:21:16 PST 2020
Branch: refs/heads/release/10.x
Home: https://github.com/llvm/llvm-project
Commit: d8a6deab7a84a559a1ff9f2196dae68870af80bf
https://github.com/llvm/llvm-project/commit/d8a6deab7a84a559a1ff9f2196dae68870af80bf
Author: Reid Kleckner <rnk at google.com>
Date: 2020-02-12 (Wed, 12 Feb 2020)
Changed paths:
M llvm/lib/Support/CrashRecoveryContext.cpp
Log Message:
-----------
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 a349c09162a8260bdf691c4f7ab72a16c33975f6)
More information about the All-commits
mailing list