xref: /llvm-project/llvm/tools/opt/opt.cpp (revision 31359840247b7d458ea8104373eea3f0cef95e16)
1 //===- opt.cpp - The LLVM Modular Optimizer -------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // Optimizations may be specified an arbitrary number of times on the command
10 // line, They are run in the order specified.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #include "llvm/ADT/ArrayRef.h"
15 #include <functional>
16 
17 namespace llvm {
18 class PassBuilder;
19 }
20 
21 extern "C" int optMain(int argc, char **argv,
22                        llvm::ArrayRef<std::function<void(llvm::PassBuilder &)>>
23                            PassBuilderCallbacks);
24 
main(int argc,char ** argv)25 int main(int argc, char **argv) { return optMain(argc, argv, {}); }
26