[RISCV] Add addu.w and slliu.w test that uses getelementptr with zero extended indices.
[lldb.git] / lldb / tools / lldb-test / SystemInitializerTest.cpp
1 //===-- SystemInitializerTest.cpp -------------------------------*- C++ -*-===//
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 #include "SystemInitializerTest.h"
10 #include "lldb/Core/Debugger.h"
11 #include "lldb/Core/PluginManager.h"
12 #include "lldb/Host/Host.h"
13 #include "lldb/Initialization/SystemInitializerCommon.h"
14 #include "lldb/Interpreter/CommandInterpreter.h"
15 #include "lldb/Utility/Timer.h"
16 #include "llvm/Support/TargetSelect.h"
17
18 #include <string>
19
20 #define LLDB_PLUGIN(p) LLDB_PLUGIN_DECLARE(p)
21 #include "Plugins/Plugins.def"
22
23 using namespace lldb_private;
24
25 SystemInitializerTest::SystemInitializerTest() = default;
26 SystemInitializerTest::~SystemInitializerTest() = default;
27
28 llvm::Error SystemInitializerTest::Initialize() {
29   if (auto e = SystemInitializerCommon::Initialize())
30     return e;
31
32   // Initialize LLVM and Clang
33   llvm::InitializeAllTargets();
34   llvm::InitializeAllAsmPrinters();
35   llvm::InitializeAllTargetMCs();
36   llvm::InitializeAllDisassemblers();
37
38 #define LLDB_SCRIPT_PLUGIN(p)
39 #define LLDB_PLUGIN(p) LLDB_PLUGIN_INITIALIZE(p);
40 #include "Plugins/Plugins.def"
41
42   // We ignored all the script interpreter earlier, so initialize
43   // ScriptInterpreterNone explicitly.
44   LLDB_PLUGIN_INITIALIZE(ScriptInterpreterNone);
45
46   // Scan for any system or user LLDB plug-ins
47   PluginManager::Initialize();
48
49   // The process settings need to know about installed plug-ins, so the
50   // Settings must be initialized AFTER PluginManager::Initialize is called.
51   Debugger::SettingsInitialize();
52
53   return llvm::Error::success();
54 }
55
56 void SystemInitializerTest::Terminate() {
57   Debugger::SettingsTerminate();
58
59   // Terminate and unload and loaded system or user LLDB plug-ins
60   PluginManager::Terminate();
61
62 #define LLDB_SCRIPT_PLUGIN(p)
63 #define LLDB_PLUGIN(p) LLDB_PLUGIN_TERMINATE(p);
64 #include "Plugins/Plugins.def"
65
66   // We ignored all the script interpreter earlier, so terminate
67   // ScriptInterpreterNone explicitly.
68   LLDB_PLUGIN_INITIALIZE(ScriptInterpreterNone);
69
70   // Now shutdown the common parts, in reverse order.
71   SystemInitializerCommon::Terminate();
72 }