[Core] Use an explicit stack for cycle detection.
[Core] Use an explicit stack for cycle detection.

apple/swift-llbuild,apple/swift-llbuild,apple/swift-llbuild,apple/swift-llbuild,apple/swift-llbuild,apple/swift-llbuild,apple/swift-llbuild