[clang] [SEH] Fix assertin when return scalar value from __try block. (PR #71488)
Reid Kleckner via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 7 14:53:41 PST 2023
================
@@ -3507,6 +3507,9 @@ static llvm::StoreInst *findDominatingStoreToReturnValue(CodeGenFunction &CGF) {
return nullptr;
// These aren't actually possible for non-coerced returns, and we
// only care about non-coerced returns on this code path.
+ // All memory instructions inside __try block are volatile.
----------------
rnk wrote:
Functionally, this is adjusting the conditions of the assert, can you move the change into the assert? Essentially, make the assert be:
```
assert(!SI->isAtomic() && (!SI->isVolatile() || CGF.currentFunctionUsesSEHTry()));
```
https://github.com/llvm/llvm-project/pull/71488
More information about the cfe-commits
mailing list