Remove duplicated code from merging.
Remove duplicated code from merging.

(cherry picked from commit df6be5fd0b5f0c7b840404df994aa16b60333026)

apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb