File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
validation-test/SILOptimizer Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -1825,6 +1825,10 @@ ConstExprFunctionState::evaluateFlowSensitive(SILInstruction *inst) {
18251825 return computeCallResult (apply);
18261826
18271827 if (isa<StoreInst>(inst) || isa<StoreBorrowInst>(inst)) {
1828+ if (auto *sb = dyn_cast<StoreBorrowInst>(inst)) {
1829+ auto addr = getConstantValue (inst->getOperand (1 ));
1830+ setValue (sb, addr);
1831+ }
18281832 auto stored = getConstantValue (inst->getOperand (0 ));
18291833 if (!stored.isConstant ())
18301834 return stored;
Original file line number Diff line number Diff line change 1+ // RUN: %target-swift-frontend -swift-version 6 -verify %s -emit-sil -o /dev/null
2+
3+ // REQUIRES: OS=macosx
4+ // REQUIRES: swift_stdlib_no_asserts,optimized_stdlib
5+
6+ import os. log
7+
8+ let logger = Logger ( subsystem: " x.y.z " , category: " c " )
9+
10+ // Check that this compiles without errors
11+
12+ func testit( buffer: UnsafeRawBufferPointer ) {
13+ logger. fault ( " buffer \( buffer, privacy: . sensitive) " )
14+ }
You can’t perform that action at this time.
0 commit comments