Files
swift-mirror/test/Driver/no-inputs.swift
Connor Wakamo 3722438826 [driver] Fix an assertion failure when running "swiftc -v -force-single-frontend-invocation".
Previously, the driver would unconditionally create a CompileJobAction if it was
in SingleCompile or Immediate mode. If there were no inputs, though, the driver
would end up asserting later because it could not create a Command for a
CompileJobAction with no inputs.

To match the behavior of the StandardCompile mode, avoid creating a
CompileJobAction if there are no inputs. (This change only affects -v, since it
disables the 'no input files' error which otherwise prevents this condition from
being hit.)

Additionally, added a test to check swiftc's behavior when no inputs are
provided.

Swift SVN r20900
2014-08-01 17:55:08 +00:00

8 lines
311 B
Swift

// RUN: %swiftc_driver_plain -v 2>&1 | FileCheck %s
// RUN: %swiftc_driver_plain -v -force-single-frontend-invocation 2>&1 | FileCheck %s
// RUN: not %swiftc_driver_plain -emit-executable 2>&1 | FileCheck --check-prefix=CHECK-ERROR %s
// CHECK-NOT: error: no input files
// CHECK-ERROR: error: no input files