File tree 2 files changed +18
-0
lines changed
validation-test/SILOptimizer
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) {
1825
1825
return computeCallResult (apply);
1826
1826
1827
1827
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
+ }
1828
1832
auto stored = getConstantValue (inst->getOperand (0 ));
1829
1833
if (!stored.isConstant ())
1830
1834
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