summaryrefslogtreecommitdiff
path: root/contrib/llvm/tools/lldb/source/Utility/ArchSpec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Utility/ArchSpec.cpp')
-rw-r--r--contrib/llvm/tools/lldb/source/Utility/ArchSpec.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/contrib/llvm/tools/lldb/source/Utility/ArchSpec.cpp b/contrib/llvm/tools/lldb/source/Utility/ArchSpec.cpp
index 1c50c313e0d1..752fb182d79a 100644
--- a/contrib/llvm/tools/lldb/source/Utility/ArchSpec.cpp
+++ b/contrib/llvm/tools/lldb/source/Utility/ArchSpec.cpp
@@ -11,15 +11,15 @@
#include "lldb/Utility/Log.h"
#include "lldb/Utility/NameMatches.h"
-#include "lldb/Utility/Stream.h" // for Stream
+#include "lldb/Utility/Stream.h"
#include "lldb/Utility/StringList.h"
-#include "lldb/lldb-defines.h" // for LLDB_INVALID_C...
+#include "lldb/lldb-defines.h"
#include "llvm/ADT/STLExtras.h"
-#include "llvm/ADT/Twine.h" // for Twine
+#include "llvm/ADT/Twine.h"
#include "llvm/BinaryFormat/COFF.h"
#include "llvm/BinaryFormat/ELF.h"
-#include "llvm/BinaryFormat/MachO.h" // for CPUType::CPU_T...
-#include "llvm/Support/Compiler.h" // for LLVM_FALLTHROUGH
+#include "llvm/BinaryFormat/MachO.h"
+#include "llvm/Support/Compiler.h"
#include "llvm/Support/Host.h"
using namespace lldb;
@@ -610,10 +610,8 @@ const char *ArchSpec::GetArchitectureName() const {
bool ArchSpec::IsMIPS() const {
const llvm::Triple::ArchType machine = GetMachine();
- if (machine == llvm::Triple::mips || machine == llvm::Triple::mipsel ||
- machine == llvm::Triple::mips64 || machine == llvm::Triple::mips64el)
- return true;
- return false;
+ return machine == llvm::Triple::mips || machine == llvm::Triple::mipsel ||
+ machine == llvm::Triple::mips64 || machine == llvm::Triple::mips64el;
}
std::string ArchSpec::GetTargetABI() const {
@@ -815,6 +813,7 @@ bool ArchSpec::CharIsSignedByDefault() const {
case llvm::Triple::ppc64le:
case llvm::Triple::systemz:
case llvm::Triple::xcore:
+ case llvm::Triple::arc:
return false;
}
}
@@ -946,13 +945,13 @@ bool ArchSpec::SetArchitecture(ArchitectureType arch_type, uint32_t cpu,
m_triple.setVendor(llvm::Triple::Apple);
// Don't set the OS. It could be simulator, macosx, ios, watchos,
- // tvos. We could get close with the cpu type - but we can't get it
- // right all of the time. Better to leave this unset so other
- // sections of code will set it when they have more information.
- // NB: don't call m_triple.setOS (llvm::Triple::UnknownOS). That sets
- // the OSName to
- // "unknown" and the ArchSpec::TripleVendorWasSpecified() method says
- // that any OSName setting means it was specified.
+ // tvos, bridgeos. We could get close with the cpu type - but we
+ // can't get it right all of the time. Better to leave this unset
+ // so other sections of code will set it when they have more
+ // information. NB: don't call m_triple.setOS (llvm::Triple::UnknownOS).
+ // That sets the OSName to "unknown" and the
+ // ArchSpec::TripleVendorWasSpecified() method says that any OSName
+ // setting means it was specified.
} else if (arch_type == eArchTypeELF) {
switch (os) {
case llvm::ELF::ELFOSABI_AIX:
@@ -1018,7 +1017,7 @@ bool ArchSpec::IsCompatibleMatch(const ArchSpec &rhs) const {
return IsEqualTo(rhs, false);
}
-static bool isCompatibleEnvironment(llvm::Triple::EnvironmentType lhs,
+static bool IsCompatibleEnvironment(llvm::Triple::EnvironmentType lhs,
llvm::Triple::EnvironmentType rhs) {
if (lhs == rhs)
return true;
@@ -1095,9 +1094,7 @@ bool ArchSpec::IsEqualTo(const ArchSpec &rhs, bool exact_match) const {
const llvm::Triple::EnvironmentType rhs_triple_env =
rhs_triple.getEnvironment();
- if (!isCompatibleEnvironment(lhs_triple_env, rhs_triple_env))
- return false;
- return true;
+ return IsCompatibleEnvironment(lhs_triple_env, rhs_triple_env);
}
return false;
}
@@ -1477,7 +1474,10 @@ bool ArchSpec::IsAlwaysThumbInstructions() const {
if (GetCore() == ArchSpec::Core::eCore_arm_armv7m ||
GetCore() == ArchSpec::Core::eCore_arm_armv7em ||
- GetCore() == ArchSpec::Core::eCore_arm_armv6m) {
+ GetCore() == ArchSpec::Core::eCore_arm_armv6m ||
+ GetCore() == ArchSpec::Core::eCore_thumbv7m ||
+ GetCore() == ArchSpec::Core::eCore_thumbv7em ||
+ GetCore() == ArchSpec::Core::eCore_thumbv6m) {
return true;
}
}