Changeset View
Changeset View
Standalone View
Standalone View
llvm/tools/llvm-lto2/llvm-lto2.cpp
//===-- llvm-lto2: test harness for the resolution-based LTO interface ----===// | //===-- llvm-lto2: test harness for the resolution-based LTO interface ----===// | ||||
Lint: Lint: clang-format not found in user's PATH; not linting file. | |||||
// | // | ||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||||
// See https://llvm.org/LICENSE.txt for license information. | // See https://llvm.org/LICENSE.txt for license information. | ||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||||
// | // | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
// | // | ||||
▲ Show 20 Lines • Show All 144 Lines • ▼ Show 20 Lines | |||||
static cl::opt<std::string> | static cl::opt<std::string> | ||||
StatsFile("stats-file", cl::desc("Filename to write statistics to")); | StatsFile("stats-file", cl::desc("Filename to write statistics to")); | ||||
static cl::list<std::string> | static cl::list<std::string> | ||||
PassPlugins("load-pass-plugin", | PassPlugins("load-pass-plugin", | ||||
cl::desc("Load passes from plugin library")); | cl::desc("Load passes from plugin library")); | ||||
static cl::opt<bool> | |||||
Lint: Pre-merge checks clang-format: please reformat the code -static cl::opt<bool> - EnableFreestanding("lto-freestanding", - cl::desc("Enable Freestanding (disable builtins / TLI) during LTO"), - cl::init(false), cl::Hidden); +static cl::opt<bool> EnableFreestanding( + "lto-freestanding", + cl::desc("Enable Freestanding (disable builtins / TLI) during LTO"), + cl::init(false), cl::Hidden); Lint: Pre-merge checks: clang-format: please reformat the code
```
-static cl::opt<bool>
- EnableFreestanding("lto… | |||||
EnableFreestanding("lto-freestanding", | |||||
cl::desc("Enable Freestanding (disable builtins / TLI) during LTO"), | |||||
cl::init(false), cl::Hidden); | |||||
static void check(Error E, std::string Msg) { | static void check(Error E, std::string Msg) { | ||||
if (!E) | if (!E) | ||||
return; | return; | ||||
handleAllErrors(std::move(E), [&](ErrorInfoBase &EIB) { | handleAllErrors(std::move(E), [&](ErrorInfoBase &EIB) { | ||||
errs() << "llvm-lto2: " << Msg << ": " << EIB.message().c_str() << '\n'; | errs() << "llvm-lto2: " << Msg << ": " << EIB.message().c_str() << '\n'; | ||||
}); | }); | ||||
exit(1); | exit(1); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 95 Lines • ▼ Show 20 Lines | static int run(int argc, char **argv) { | ||||
Conf.RunCSIRInstr = RunCSIRInstr; | Conf.RunCSIRInstr = RunCSIRInstr; | ||||
// Run a custom pipeline, if asked for. | // Run a custom pipeline, if asked for. | ||||
Conf.OptPipeline = OptPipeline; | Conf.OptPipeline = OptPipeline; | ||||
Conf.AAPipeline = AAPipeline; | Conf.AAPipeline = AAPipeline; | ||||
Conf.OptLevel = OptLevel - '0'; | Conf.OptLevel = OptLevel - '0'; | ||||
Conf.UseNewPM = UseNewPM; | Conf.UseNewPM = UseNewPM; | ||||
Conf.Freestanding = EnableFreestanding; | |||||
for (auto &PluginFN : PassPlugins) | for (auto &PluginFN : PassPlugins) | ||||
Conf.PassPlugins.push_back(PluginFN); | Conf.PassPlugins.push_back(PluginFN); | ||||
switch (CGOptLevel) { | switch (CGOptLevel) { | ||||
case '0': | case '0': | ||||
Conf.CGOptLevel = CodeGenOpt::None; | Conf.CGOptLevel = CodeGenOpt::None; | ||||
break; | break; | ||||
case '1': | case '1': | ||||
Conf.CGOptLevel = CodeGenOpt::Less; | Conf.CGOptLevel = CodeGenOpt::Less; | ||||
▲ Show 20 Lines • Show All 202 Lines • Show Last 20 Lines |
clang-format not found in user's PATH; not linting file.