[Lldb-commits] [PATCH] D71103: [libomptarget][nfc] Move three more files to common
JonChesterfield updated this revision to Diff 232557. JonChesterfield added a comment. - update comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71103/new/ https://reviews.llvm.org/D71103 Files: openmp/libomptarget/deviceRTLs/common/src/parallel.cu openmp/libomptarget/deviceRTLs/common/src/support.cu openmp/libomptarget/deviceRTLs/common/src/sync.cu openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt openmp/libomptarget/deviceRTLs/nvptx/src/parallel.cu openmp/libomptarget/deviceRTLs/nvptx/src/support.cu openmp/libomptarget/deviceRTLs/nvptx/src/sync.cu Index: openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt === --- openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt +++ openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt @@ -57,10 +57,10 @@ src/libcall.cu ${devicertl_common_directory}/src/loop.cu ${devicertl_common_directory}/src/omptarget.cu - src/parallel.cu + ${devicertl_common_directory}/src/parallel.cu src/reduction.cu - src/support.cu - src/sync.cu + ${devicertl_common_directory}/src/support.cu + ${devicertl_common_directory}/src/sync.cu ${devicertl_common_directory}/src/task.cu ) Index: openmp/libomptarget/deviceRTLs/common/src/sync.cu === --- openmp/libomptarget/deviceRTLs/common/src/sync.cu +++ openmp/libomptarget/deviceRTLs/common/src/sync.cu @@ -1,4 +1,4 @@ -//=== sync.h - NVPTX OpenMP synchronizations - CUDA -*-===// +//=== sync.cu - OpenMP synchronizations -- CUDA -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. Index: openmp/libomptarget/deviceRTLs/common/src/support.cu === --- openmp/libomptarget/deviceRTLs/common/src/support.cu +++ openmp/libomptarget/deviceRTLs/common/src/support.cu @@ -1,4 +1,4 @@ -//===- support.cu - NVPTX OpenMP support functions --- CUDA -*-===// +//===- support.cu - OpenMP support functions - CUDA -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. Index: openmp/libomptarget/deviceRTLs/common/src/parallel.cu === --- openmp/libomptarget/deviceRTLs/common/src/parallel.cu +++ openmp/libomptarget/deviceRTLs/common/src/parallel.cu @@ -1,4 +1,4 @@ -//=== parallel.cu - NVPTX OpenMP parallel implementation - CUDA -*-===// +//=== parallel.cu - GPU OpenMP parallel implementation --- CUDA -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. Index: openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt === --- openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt +++ openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt @@ -57,10 +57,10 @@ src/libcall.cu ${devicertl_common_directory}/src/loop.cu ${devicertl_common_directory}/src/omptarget.cu - src/parallel.cu + ${devicertl_common_directory}/src/parallel.cu src/reduction.cu - src/support.cu - src/sync.cu + ${devicertl_common_directory}/src/support.cu + ${devicertl_common_directory}/src/sync.cu ${devicertl_common_directory}/src/task.cu ) Index: openmp/libomptarget/deviceRTLs/common/src/sync.cu === --- openmp/libomptarget/deviceRTLs/common/src/sync.cu +++ openmp/libomptarget/deviceRTLs/common/src/sync.cu @@ -1,4 +1,4 @@ -//=== sync.h - NVPTX OpenMP synchronizations - CUDA -*-===// +//=== sync.cu - OpenMP synchronizations -- CUDA -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. Index: openmp/libomptarget/deviceRTLs/common/src/support.cu === --- openmp/libomptarget/deviceRTLs/common/src/support.cu +++ openmp/libomptarget/deviceRTLs/common/src/support.cu @@ -1,4 +1,4 @@ -//===- support.cu - NVPTX OpenMP support functions --- CUDA -*-===// +//===- support.cu - OpenMP support functions - CUDA -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. Index: openmp/libomptarget/deviceRTLs/common/src/parallel.cu === --- openmp/libomptarget/devic
[Lldb-commits] [lldb] 0a57034 - [lldb/SWIG] Guard embedded Python code in SWIG interfaces by SWIGPYTHON
Author: Jonas Devlieghere Date: 2019-12-08T14:48:51-08:00 New Revision: 0a5703458b7f577f628ca123a47c209653f19dc2 URL: https://github.com/llvm/llvm-project/commit/0a5703458b7f577f628ca123a47c209653f19dc2 DIFF: https://github.com/llvm/llvm-project/commit/0a5703458b7f577f628ca123a47c209653f19dc2.diff LOG: [lldb/SWIG] Guard embedded Python code in SWIG interfaces by SWIGPYTHON Guard the embedded Python code in LLDB's interface files by the SWIGPYTHON define to ensures they can be reused for other languages supported by SWIG. Added: Modified: lldb/scripts/interface/SBAddress.i lldb/scripts/interface/SBBlock.i lldb/scripts/interface/SBBreakpoint.i lldb/scripts/interface/SBCompileUnit.i lldb/scripts/interface/SBData.i lldb/scripts/interface/SBDebugger.i lldb/scripts/interface/SBDeclaration.i lldb/scripts/interface/SBError.i lldb/scripts/interface/SBExecutionContext.i lldb/scripts/interface/SBFile.i lldb/scripts/interface/SBFileSpec.i lldb/scripts/interface/SBFrame.i lldb/scripts/interface/SBFunction.i lldb/scripts/interface/SBInstruction.i lldb/scripts/interface/SBInstructionList.i lldb/scripts/interface/SBLineEntry.i lldb/scripts/interface/SBModule.i lldb/scripts/interface/SBProcess.i lldb/scripts/interface/SBSection.i lldb/scripts/interface/SBStringList.i lldb/scripts/interface/SBSymbol.i lldb/scripts/interface/SBSymbolContext.i lldb/scripts/interface/SBSymbolContextList.i lldb/scripts/interface/SBTarget.i lldb/scripts/interface/SBThread.i lldb/scripts/interface/SBType.i lldb/scripts/interface/SBTypeCategory.i lldb/scripts/interface/SBTypeEnumMember.i lldb/scripts/interface/SBTypeFilter.i lldb/scripts/interface/SBTypeFormat.i lldb/scripts/interface/SBTypeNameSpecifier.i lldb/scripts/interface/SBTypeSummary.i lldb/scripts/interface/SBTypeSynthetic.i lldb/scripts/interface/SBUnixSignals.i lldb/scripts/interface/SBValue.i lldb/scripts/interface/SBValueList.i Removed: diff --git a/lldb/scripts/interface/SBAddress.i b/lldb/scripts/interface/SBAddress.i index 92bc3f828f23..6c5352bac6d7 100644 --- a/lldb/scripts/interface/SBAddress.i +++ b/lldb/scripts/interface/SBAddress.i @@ -63,12 +63,14 @@ public: explicit operator bool() const; +#ifdef SWIGPYTHON // operator== is a free function, which swig does not handle, so we inject // our own equality operator here %pythoncode%{ def __eq__(self, other): return not self.__ne__(other) %} +#endif bool operator!=(const SBAddress &rhs) const; @@ -138,6 +140,7 @@ public: lldb::SBLineEntry GetLineEntry (); +#ifdef SWIGPYTHON %pythoncode %{ def __get_load_addr_property__ (self): '''Get the load address for a lldb.SBAddress using the current target.''' @@ -173,6 +176,7 @@ public: file_addr = property(GetFileAddress, None, doc='''A read only property that returns file address for the section as an integer. This is the address that represents the address as it is found in the object file that defines it.''') load_addr = property(__get_load_addr_property__, __set_load_addr_property__, doc='''A read/write property that gets/sets the SBAddress using load address. The setter resolves SBAddress using the SBTarget from lldb.target so this property can ONLY be used in the interactive script interpreter (i.e. under the lldb script command) and not in Python based commands, or breakpoint commands.''') %} +#endif }; diff --git a/lldb/scripts/interface/SBBlock.i b/lldb/scripts/interface/SBBlock.i index 6d2cebfa0cc2..73079a11760c 100644 --- a/lldb/scripts/interface/SBBlock.i +++ b/lldb/scripts/interface/SBBlock.i @@ -100,6 +100,7 @@ public: bool locals, bool statics); +#ifdef SWIGPYTHON %pythoncode %{ def get_range_at_index(self, idx): if idx < self.GetNumRanges(): @@ -153,6 +154,7 @@ public: ranges = property(get_ranges_array, None, doc='''A read only property that returns a list() object that contains all of the address ranges for the block.''') num_ranges = property(GetNumRanges, None, doc='''A read only property that returns the same result as GetNumRanges().''') %} +#endif }; diff --git a/lldb/scripts/interface/SBBreakpoint.i b/lldb/scripts/interface/SBBreakpoint.i index a33aeea40b71..f84f2ada3d32 100644 --- a/lldb/scripts/interface/SBBreakpoint.i +++ b/lldb/scripts/interface/SBBreakpoint.i @@ -249,6 +249,7 @@ public: bool IsHardware (); +#ifdef SWIGPYTHON %pythoncode %{ class locations_access(object): @@ -295,6 +296,7 @@ public: one_shot = property(IsOneShot, SetOneShot, doc='''A read/write property that configures whether this breakpoint is one-shot (deleted when hit) or not.'''
[Lldb-commits] [PATCH] D71183: [lldb] Support for DWARF-5 atomic types
teemperor created this revision. teemperor added reviewers: labath, aprantl. Herald added subscribers: lldb-commits, JDevlieghere, abidh, jfb. Herald added a reviewer: shafik. Herald added a project: LLDB. This patch adds support for atomic types (DW_TAG_atomic_type) to LLDB. It's mostly just filling out all the switch-statements that didn't implement Atomic case with the usual boilerplate. Thanks Pavel for writing the test case. Repository: rLLDB LLDB https://reviews.llvm.org/D71183 Files: lldb/include/lldb/Symbol/ClangASTContext.h lldb/include/lldb/Symbol/CompilerType.h lldb/include/lldb/Symbol/Type.h lldb/include/lldb/Symbol/TypeSystem.h lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp lldb/source/Symbol/ClangASTContext.cpp lldb/source/Symbol/CompilerType.cpp lldb/source/Symbol/Type.cpp lldb/source/Symbol/TypeSystem.cpp lldb/test/Shell/SymbolFile/DWARF/dwarf5-atomic.s Index: lldb/test/Shell/SymbolFile/DWARF/dwarf5-atomic.s === --- /dev/null +++ lldb/test/Shell/SymbolFile/DWARF/dwarf5-atomic.s @@ -0,0 +1,104 @@ +# REQUIRES: x86 + +# RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s > %t +# RUN: %lldb %t -o "target variable integer structure" -o exit | FileCheck %s + +# CHECK: (_Atomic(int)) integer = 14159 +# CHECK: (_Atomic(struct_type)) structure = {} + +.data +integer: +.long 14159 +structure: +.byte 0 + +.section.debug_abbrev,"",@progbits +.byte 1 # Abbreviation Code +.byte 17 # DW_TAG_compile_unit +.byte 1 # DW_CHILDREN_yes +.byte 37 # DW_AT_producer +.byte 8 # DW_FORM_string +.byte 19 # DW_AT_language +.byte 5 # DW_FORM_data2 +.byte 0 # EOM(1) +.byte 0 # EOM(2) + .byte 2 # Abbreviation Code + .byte 52 # DW_TAG_variable + .byte 0 # DW_CHILDREN_no + .byte 3 # DW_AT_name + .byte 8 # DW_FORM_string + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 2 # DW_AT_location + .byte 24 # DW_FORM_exprloc + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 3 # Abbreviation Code + .byte 71 # DW_TAG_atomic_type + .byte 0 # DW_CHILDREN_no + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) +.byte 4 # Abbreviation Code +.byte 36 # DW_TAG_base_type +.byte 0 # DW_CHILDREN_no +.byte 3 # DW_AT_name +.byte 8 # DW_FORM_string +.byte 62 # DW_AT_encoding +.byte 11 # DW_FORM_data1 +.byte 11 # DW_AT_byte_size +.byte 11 # DW_FORM_data1 +.byte 0 # EOM(1) +.byte 0 # EOM(2) +.byte 5 # Abbreviation Code +.byte 19 # DW_TAG_structure_type +.byte 0 # DW_CHILDREN_no +.byte 3 # DW_AT_name +.byte 8 # DW_FORM_string +.byte 11 # DW_AT_byte_size +.byte 11 # DW_FORM_data1 +.byte 0 # EOM(1) +.byte 0 # EOM(2) +.byte 0 # EOM(3) + +.section.debug_info,"",@progbits +.Lcu_begin0: +.long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit +.Ldebug_info_start0: +.short 5 # DWARF version number +.byte 1 # DWARF Unit Type +.byte 8 # Address Size (in bytes) +.long .debug_abbrev # Offset Into Abbrev. Section +.byte 1 # Abbrev [1] 0xb:0x50 DW_TAG_compile_unit +.asciz "Hand-written DWARF"# DW_AT_producer +.short 12 # DW_AT_language +.byte 2 # Abbrev [2] DW_TAG_variable +.asciz "integer" # DW_AT_name +.long .Latomic_int# DW_AT_type +.byte 9 # DW_AT_location +.byte 3 +.quad integer +.byte 2