summaryrefslogtreecommitdiff
path: root/source/Plugins/Architecture/PPC64/ArchitecturePPC64.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Plugins/Architecture/PPC64/ArchitecturePPC64.cpp')
-rw-r--r--source/Plugins/Architecture/PPC64/ArchitecturePPC64.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/source/Plugins/Architecture/PPC64/ArchitecturePPC64.cpp b/source/Plugins/Architecture/PPC64/ArchitecturePPC64.cpp
index 619de093aaccf..76eaa44546eb1 100644
--- a/source/Plugins/Architecture/PPC64/ArchitecturePPC64.cpp
+++ b/source/Plugins/Architecture/PPC64/ArchitecturePPC64.cpp
@@ -1,9 +1,8 @@
//===-- ArchitecturePPC64.cpp -----------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// 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
//
//===----------------------------------------------------------------------===//
@@ -36,11 +35,10 @@ void ArchitecturePPC64::Terminate() {
}
std::unique_ptr<Architecture> ArchitecturePPC64::Create(const ArchSpec &arch) {
- if ((arch.GetMachine() != llvm::Triple::ppc64 &&
- arch.GetMachine() != llvm::Triple::ppc64le) ||
- arch.GetTriple().getObjectFormat() != llvm::Triple::ObjectFormatType::ELF)
- return nullptr;
- return std::unique_ptr<Architecture>(new ArchitecturePPC64());
+ if (arch.GetTriple().isPPC64() &&
+ arch.GetTriple().getObjectFormat() == llvm::Triple::ObjectFormatType::ELF)
+ return std::unique_ptr<Architecture>(new ArchitecturePPC64());
+ return nullptr;
}
ConstString ArchitecturePPC64::GetPluginName() { return GetPluginNameStatic(); }