Files
llvm-project/llvm/tools/opt/opt.cpp
Rahul Joshi 39128b9ec4 [NFC][LLVM] Code cleanup in opt (#164077)
- Use namespace qualifiers to define variables declared in `llvm`
namespace.
- move file local `TimeTracerRAII` struct into anonymous namespace.
- Use explicit types in a few places.
- Convert the loop over `PassList` to a range for loop.
2025-10-20 09:36:00 -07:00

28 lines
888 B
C++

//===- opt.cpp - The LLVM Modular Optimizer -------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// Optimizations may be specified an arbitrary number of times on the command
// line, They are run in the order specified.
//
//===----------------------------------------------------------------------===//
#include "llvm/ADT/ArrayRef.h"
#include <functional>
using namespace llvm;
namespace llvm {
class PassBuilder;
}
extern "C" int
optMain(int argc, char **argv,
ArrayRef<std::function<void(PassBuilder &)>> PassBuilderCallbacks);
int main(int argc, char **argv) { return optMain(argc, argv, {}); }