Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / source / Plugins / Architecture / AArch64 / ArchitectureAArch64.cpp
blob1b2b41ee8758758119668d71c65f21bf3ede6b88
1 //===-- ArchitectureAArch64.cpp -------------------------------------------===//
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 //===----------------------------------------------------------------------===//
9 #include "Plugins/Architecture/AArch64/ArchitectureAArch64.h"
10 #include "lldb/Core/PluginManager.h"
11 #include "lldb/Utility/ArchSpec.h"
13 using namespace lldb_private;
14 using namespace lldb;
16 LLDB_PLUGIN_DEFINE(ArchitectureAArch64)
18 void ArchitectureAArch64::Initialize() {
19 PluginManager::RegisterPlugin(GetPluginNameStatic(),
20 "AArch64-specific algorithms",
21 &ArchitectureAArch64::Create);
24 void ArchitectureAArch64::Terminate() {
25 PluginManager::UnregisterPlugin(&ArchitectureAArch64::Create);
28 std::unique_ptr<Architecture>
29 ArchitectureAArch64::Create(const ArchSpec &arch) {
30 auto machine = arch.GetMachine();
31 if (machine != llvm::Triple::aarch64 && machine != llvm::Triple::aarch64_be &&
32 machine != llvm::Triple::aarch64_32) {
33 return nullptr;
35 return std::unique_ptr<Architecture>(new ArchitectureAArch64());