diff options
author | Matthew Gardiner <mg11@csr.com> | 2014-09-01 09:06:03 +0000 |
---|---|---|
committer | Matthew Gardiner <mg11@csr.com> | 2014-09-01 09:06:03 +0000 |
commit | e77b2948b49c6f868764cfdd7ca832ab1bde13bb (patch) | |
tree | 670f9abd82edabaea8da3e20a203254f27d6ab1f /lldb/source/Core/ArchSpec.cpp | |
parent | 0c083024f0fdaa958ec8b1a8cd5b27dc53bf68af (diff) | |
download | bcm5719-llvm-e77b2948b49c6f868764cfdd7ca832ab1bde13bb.tar.gz bcm5719-llvm-e77b2948b49c6f868764cfdd7ca832ab1bde13bb.zip |
Add an interface on ArchSpec to provide lldb client code
with a mechanism to query if the current target architecture
has non 8-bit bytes.
llvm-svn: 216867
Diffstat (limited to 'lldb/source/Core/ArchSpec.cpp')
-rw-r--r-- | lldb/source/Core/ArchSpec.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/lldb/source/Core/ArchSpec.cpp b/lldb/source/Core/ArchSpec.cpp index 9d80222be6a..5f010f06640 100644 --- a/lldb/source/Core/ArchSpec.cpp +++ b/lldb/source/Core/ArchSpec.cpp @@ -497,6 +497,40 @@ ArchSpec::GetMachOCPUSubType () const return LLDB_INVALID_CPUTYPE; } +uint32_t +ArchSpec::GetDataByteSize () const +{ + switch (m_core) + { + case eCore_kalimba3: + return 3; + case eCore_kalimba4: + return 1; + case eCore_kalimba5: + return 3; + default: + return 1; + } + return 1; +} + +uint32_t +ArchSpec::GetCodeByteSize () const +{ + switch (m_core) + { + case eCore_kalimba3: + return 4; + case eCore_kalimba4: + return 1; + case eCore_kalimba5: + return 1; + default: + return 1; + } + return 1; +} + llvm::Triple::ArchType ArchSpec::GetMachine () const { |