mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SwiftCompilerSources: move SIL-related Context APIs from Optimizer to the SIL module
This commit is contained in:
@@ -56,7 +56,7 @@ extension BuiltinInst : OnoneSimplifiable, SILCombineSimplifiable {
|
||||
case .Xor:
|
||||
simplifyNegation(context)
|
||||
default:
|
||||
if let literal = constantFold(context) {
|
||||
if let literal = context.constantFold(builtin: self) {
|
||||
uses.replaceAll(with: literal, context)
|
||||
}
|
||||
}
|
||||
@@ -240,7 +240,7 @@ private extension BuiltinInst {
|
||||
if constantFoldStringNullPointerCheck(isEqual: isEqual, context) {
|
||||
return
|
||||
}
|
||||
if let literal = constantFold(context) {
|
||||
if let literal = context.constantFold(builtin: self) {
|
||||
uses.replaceAll(with: literal, context)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user