Skip to content
Snippets Groups Projects
Select Git revision
  • SEDEI
  • main default
  • users/chapuni/cov/single/trunk
  • users/chapuni/cov/single/binop
  • users/chapuni/cov/single/binop-base
  • users/agozillo/alloca-member-map-3
  • users/agozillo/alloca-member-map-2
  • users/agozillo/alloca-member-map-1
  • users/agozillon/main.openmpmlir-descriptor-explicit-member-map-lowering-changes-2
  • users/agozillon/openmpmlir-descriptor-explicit-member-map-lowering-changes-2
  • users/MaskRay/spr/driver-remove-ignored-flag-form-of-fauto-profile-fprofile-sample-use
  • users/walter-erquinigo/run
  • users/walter-erquinigo/dw_form
  • users/chapuni/cov/single/pair
  • users/matthias-springer/merge_type_converters
  • users/vhscampos/multilib-flags-cmd-line-option
  • users/vhscampos/multilib-flags-processing
  • users/vhscampos/multilib-flags-yaml-parsing
  • users/fmayer/spr/nfc-mte-add-more-tests-for-globals
  • users/fmayer/spr/main.nfc-mte-add-more-tests-for-globals
  • llvmorg-19.1.2
  • llvmorg-19.1.1
  • llvmorg-19.1.0
  • llvmorg-19.1.0-rc4
  • llvmorg-19.1.0-rc3
  • llvmorg-19.1.0-rc2
  • llvmorg-19.1.0-rc1
  • llvmorg-20-init
  • llvmorg-18.1.8
  • llvmorg-18.1.7
  • llvmorg-18.1.6
  • llvmorg-18.1.5
  • llvmorg-18.1.4
  • llvmorg-18.1.3
  • llvmorg-18.1.2
  • llvmorg-18.1.1
  • llvmorg-18.1.0
  • llvmorg-18.1.0-rc4
  • llvmorg-18.1.0-rc3
  • llvmorg-18.1.0-rc2
40 results

lldb

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Pete Lawrence authored
    As I worked through changes to another PR
    (https://github.com/llvm/llvm-project/pull/74912), I couldn't help but
    rewrite a few methods for readability, maintainability, and possibly
    some behavior correctness too.
    
    1. Exiting early instead of nested `if`-statements, which:
    	- Reduces indentation levels for all subsequent lines
    	- Treats missing pre-conditions similar to an error
    - Clearly indicates that the full length of the method is the "happy
    path".
    2. Explicitly return empty Value Object shared pointers for those error
    (like) situations, which
    - Reduces the time it takes a maintainer to figure out what the method
    actually returns based on those conditions.
    
    3. Converting a mix of `if` and `if`-`else`-statements around an enum
    into one `switch` statement, which:
    	- Consolidates the former branching logic
    	- Lets the compiler warn you of a (future) missing enum case
    - This one may actually change behavior slightly, because what was an
    early test for one enum case, now happens later on in the `switch`.
    
    4. Consolidating near-identical, "copy-pasta" logic into one place,
    which:
    	- Separates the common code to the diverging paths.
    	- Highlights the differences between the code paths.
    
    
    
    rdar://119833526
    d6575198
    History
    Name Last commit Last update
    ..