[lldb][NFC] Fix all formatting errors in .cpp file headers
Summary:
A *.cpp file header in LLDB (and in LLDB) should like this:
```
//===-- TestUtilities.cpp -------------------------------------------------===//
```
However in LLDB most of our source files have arbitrary changes to this format and
these changes are spreading through LLDB as folks usually just use the existing
source files as templates for their new files (most notably the unnecessary
editor language indicator `-*- C++ -*-` is spreading and in every review
someone is pointing out that this is wrong, resulting in people pointing out that this
is done in the same way in other files).
This patch removes most of these inconsistencies including the editor language indicators,
all the different missing/additional '-' characters, files that center the file name, missing
trailing `===//` (mostly caused by clang-format breaking the line).
Reviewers: aprantl, espindola, jfb, shafik, JDevlieghere
Reviewed By: JDevlieghere
Subscribers: dexonsmith, wuzish, emaste, sdardis, nemanjai, kbarton, MaskRay, atanasyan, arphaman, jfb, abidh, jsji, JDevlieghere, usaxena95, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D73258
2020-01-24 08:23:27 +01:00
|
|
|
//===-- SystemInitializerFull.cpp -----------------------------------------===//
|
2015-03-31 21:03:22 +00:00
|
|
|
//
|
2019-01-19 08:50:56 +00:00
|
|
|
// 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
|
2015-03-31 21:03:22 +00:00
|
|
|
//
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
2018-05-25 20:28:16 +00:00
|
|
|
#include "SystemInitializerFull.h"
|
2015-07-30 20:28:07 +00:00
|
|
|
#include "lldb/API/SBCommandInterpreter.h"
|
2015-03-31 21:03:22 +00:00
|
|
|
#include "lldb/Core/Debugger.h"
|
2020-02-07 14:58:18 -08:00
|
|
|
#include "lldb/Core/PluginManager.h"
|
|
|
|
|
#include "lldb/Host/Config.h"
|
2015-03-31 21:03:22 +00:00
|
|
|
#include "lldb/Host/Host.h"
|
|
|
|
|
#include "lldb/Initialization/SystemInitializerCommon.h"
|
2015-07-30 20:28:07 +00:00
|
|
|
#include "lldb/Interpreter/CommandInterpreter.h"
|
2017-06-29 14:32:17 +00:00
|
|
|
#include "lldb/Utility/Timer.h"
|
2015-03-31 21:03:22 +00:00
|
|
|
#include "llvm/Support/TargetSelect.h"
|
|
|
|
|
|
2019-05-03 23:19:27 +00:00
|
|
|
#pragma clang diagnostic push
|
|
|
|
|
#pragma clang diagnostic ignored "-Wglobal-constructors"
|
|
|
|
|
#include "llvm/ExecutionEngine/MCJIT.h"
|
|
|
|
|
#pragma clang diagnostic pop
|
|
|
|
|
|
2015-03-31 21:03:22 +00:00
|
|
|
#include <string>
|
|
|
|
|
|
2020-02-18 11:25:42 -08:00
|
|
|
#define LLDB_PLUGIN(p) LLDB_PLUGIN_DECLARE(p)
|
|
|
|
|
#include "Plugins/Plugins.def"
|
2020-02-07 17:58:30 -08:00
|
|
|
|
2015-03-31 21:03:22 +00:00
|
|
|
using namespace lldb_private;
|
|
|
|
|
|
2020-02-17 22:57:06 -08:00
|
|
|
SystemInitializerFull::SystemInitializerFull() = default;
|
|
|
|
|
SystemInitializerFull::~SystemInitializerFull() = default;
|
2015-03-31 21:03:22 +00:00
|
|
|
|
2019-02-21 22:26:16 +00:00
|
|
|
llvm::Error SystemInitializerFull::Initialize() {
|
|
|
|
|
if (auto e = SystemInitializerCommon::Initialize())
|
2018-12-03 17:28:29 +00:00
|
|
|
return e;
|
2018-05-24 12:44:18 +00:00
|
|
|
|
2015-03-31 21:03:22 +00:00
|
|
|
// Initialize LLVM and Clang
|
|
|
|
|
llvm::InitializeAllTargets();
|
|
|
|
|
llvm::InitializeAllAsmPrinters();
|
|
|
|
|
llvm::InitializeAllTargetMCs();
|
|
|
|
|
llvm::InitializeAllDisassemblers();
|
2016-09-06 20:57:50 +00:00
|
|
|
|
2020-02-18 19:13:45 -08:00
|
|
|
#define LLDB_PLUGIN(p) LLDB_PLUGIN_INITIALIZE(p);
|
|
|
|
|
#include "Plugins/Plugins.def"
|
2020-02-17 19:02:25 -08:00
|
|
|
|
|
|
|
|
// Scan for any system or user LLDB plug-ins
|
2015-03-31 21:03:22 +00:00
|
|
|
PluginManager::Initialize();
|
|
|
|
|
|
2018-04-30 16:49:04 +00:00
|
|
|
// The process settings need to know about installed plug-ins, so the
|
2020-02-18 19:13:45 -08:00
|
|
|
// Settings must be initialized AFTER PluginManager::Initialize is called.
|
2015-03-31 21:03:22 +00:00
|
|
|
Debugger::SettingsInitialize();
|
2018-12-03 17:28:29 +00:00
|
|
|
|
|
|
|
|
return llvm::Error::success();
|
2015-03-31 21:03:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SystemInitializerFull::Terminate() {
|
2017-05-15 13:02:37 +00:00
|
|
|
static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
|
|
|
|
|
Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION);
|
2016-09-06 20:57:50 +00:00
|
|
|
|
2015-03-31 21:03:22 +00:00
|
|
|
Debugger::SettingsTerminate();
|
2016-09-06 20:57:50 +00:00
|
|
|
|
2020-02-17 19:02:25 -08:00
|
|
|
// Terminate and unload and loaded system or user LLDB plug-ins
|
2015-03-31 21:03:22 +00:00
|
|
|
PluginManager::Terminate();
|
2016-09-06 20:57:50 +00:00
|
|
|
|
2020-02-18 19:13:45 -08:00
|
|
|
#define LLDB_PLUGIN(p) LLDB_PLUGIN_TERMINATE(p);
|
|
|
|
|
#include "Plugins/Plugins.def"
|
2020-02-07 14:58:18 -08:00
|
|
|
|
2015-03-31 21:03:22 +00:00
|
|
|
// Now shutdown the common parts, in reverse order.
|
|
|
|
|
SystemInitializerCommon::Terminate();
|
|
|
|
|
}
|