Skip to content

Commit 4826039

Browse files
authored
[LLDB][NVIDIA] Add NVPTX architecture support (#158334)
- Introduced a new method `IsNVPTX()` in `ArchSpec` to check for NVPTX architecture. - Implemented the corresponding method in `ArchSpec.cpp` to utilize the existing triple architecture checks.
1 parent 6af94c5 commit 4826039

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

lldb/include/lldb/Utility/ArchSpec.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,11 @@ class ArchSpec {
327327
/// \return a boolean value.
328328
bool IsMIPS() const;
329329

330+
/// If NVPTX architecture return true.
331+
///
332+
/// \return a boolean value.
333+
bool IsNVPTX() const;
334+
330335
/// Returns a string representing current architecture as a target CPU for
331336
/// tools like compiler, disassembler etc.
332337
///

lldb/source/Utility/ArchSpec.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,8 @@ const char *ArchSpec::GetArchitectureName() const {
545545

546546
bool ArchSpec::IsMIPS() const { return GetTriple().isMIPS(); }
547547

548+
bool ArchSpec::IsNVPTX() const { return GetTriple().isNVPTX(); }
549+
548550
std::string ArchSpec::GetTargetABI() const {
549551

550552
std::string abi;

0 commit comments

Comments
 (0)