blob: d7cfb5ec7a4028e128b0bc08f2f4245c8b2cf3ad [file] [log] [blame]
Chandler Carruth52eef882014-01-12 12:15:39 +00001; This test is essentially doing very basic things with the opt tool and the
2; new pass manager pipeline. It will be used to flesh out the feature
3; completeness of the opt tool when the new pass manager is engaged. The tests
4; may not be useful once it becomes the default or may get spread out into other
5; files, but for now this is just going to step the new process through its
6; paces.
7
8; RUN: opt -disable-output -debug-pass-manager -passes=print %s 2>&1 \
9; RUN: | FileCheck %s --check-prefix=CHECK-MODULE-PRINT
10; CHECK-MODULE-PRINT: Starting module pass manager
11; CHECK-MODULE-PRINT: Running module pass: PrintModulePass
12; CHECK-MODULE-PRINT: ModuleID
13; CHECK-MODULE-PRINT: define void @foo()
14; CHECK-MODULE-PRINT: Finished module pass manager
15
16; RUN: opt -disable-output -debug-pass-manager -passes='function(print)' %s 2>&1 \
17; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-PRINT
18; CHECK-FUNCTION-PRINT: Starting module pass manager
19; CHECK-FUNCTION-PRINT: Starting function pass manager
20; CHECK-FUNCTION-PRINT: Running function pass: PrintFunctionPass
21; CHECK-FUNCTION-PRINT-NOT: ModuleID
22; CHECK-FUNCTION-PRINT: define void @foo()
23; CHECK-FUNCTION-PRINT: Finished function pass manager
24; CHECK-FUNCTION-PRINT: Finished module pass manager
25
Chandler Carruthb353c3f2014-01-13 05:16:45 +000026; RUN: opt -S -o - -passes='no-op-module,no-op-module' %s \
27; RUN: | FileCheck %s --check-prefix=CHECK-NOOP
28; CHECK-NOOP: define void @foo() {
29; CHECK-NOOP: ret void
30; CHECK-NOOP: }
31
Chandler Carruth52eef882014-01-12 12:15:39 +000032define void @foo() {
33 ret void
34}