llvm with tablegen backend for capstone disassembler
Go to file
Pete Lawrence d657519838
[lldb] Improve maintainability and readability for ValueObject methods (#75865)
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
2024-01-23 16:07:52 -08:00
.ci [CI] Add lld as compiler-rt dependecy (#78536) 2024-01-17 21:10:54 -08:00
.github [libc++] Run the nightly libc++ build at 03:00 Eastern for real (#79184) 2024-01-23 15:27:54 -05:00
bolt [BOLT] Fix unconditional output of boltedcollection in merge-fdata (#78653) 2024-01-18 20:00:47 -08:00
clang [nfc][clang] Fix test in new-array-init.cpp (#79225) 2024-01-23 15:42:49 -08:00
clang-tools-extra [misc-coroutine-hostile-raii] Use getOperand instead of getCommonExpr. (#79206) 2024-01-23 23:07:00 +01:00
cmake
compiler-rt [NFCI] Move SANITIZER_WEAK_IMPORT to sanitizer_common (#79208) 2024-01-23 14:42:59 -08:00
cross-project-tests Revert "[BOLT] Fix unconditional output of boltedcollection in merge-fdata (#78653)" 2024-01-18 19:59:09 -08:00
flang [AMDGPU] Change default AMDHSA Code Object version to 5 (#79038) 2024-01-23 17:08:18 +05:30
libc [libc] remove redundant call_once (#79226) 2024-01-23 15:38:12 -08:00
libclc libclc: add missing AMD gfx symlinks (#78884) 2024-01-22 15:32:13 +07:00
libcxx Revert "[ASan][libc++] Turn on ASan annotations for short strings (#79049)" 2024-01-23 22:56:22 +00:00
libcxxabi [libc++] Fix the behavior of throwing operator new under -fno-exceptions (#69498) 2024-01-22 22:33:04 -05:00
libunwind [libunwind] Move errno.h and signal.h includes under the block where they're needed (#78054) 2024-01-16 10:31:01 -05:00
lld [ELF,test] Actually fix defsym.ll 2024-01-23 12:52:36 -08:00
lldb [lldb] Improve maintainability and readability for ValueObject methods (#75865) 2024-01-23 16:07:52 -08:00
llvm [SROA] NFC: Extract code to checkVectorTypesForPromotion 2024-01-23 15:40:20 -08:00
llvm-libgcc [llvm-libgcc][CMake] Refactor llvm-libgcc (#65455) 2023-09-18 22:56:03 -07:00
mlir [mlir][ArithToAMDGPU] Add option for saturating truncation to fp8 (#74153) 2024-01-23 16:52:21 -06:00
openmp Re-land [openmp] Fix warnings when building on Windows with latest MSVC or Clang ToT (#77853) 2024-01-23 12:48:38 -05:00
polly [AST] Don't merge memory locations in AliasSetTracker (#65731) 2024-01-17 15:59:13 +01:00
pstl
runtimes [CMake] Always define runtimes-test-depends (#73629) 2023-11-28 15:30:52 -08:00
third-party [third-party] Silence warning on benchmark when building with Clang ToT 2024-01-17 07:23:56 -05:00
utils [Blaze] Fix build file 2024-01-22 15:45:04 -08:00
.arcconfig
.arclint
.clang-format
.clang-tidy
.git-blame-ignore-revs [libc++] Add libc++ clang-formatting commit to git-blame-ignore-revs file 2023-12-18 14:04:41 -05:00
.gitattributes [libc++] Format the code base (#74334) 2023-12-18 14:01:33 -05:00
.gitignore
.mailmap .mailmap: add second entry for self 2023-12-19 11:13:19 +00:00
CODE_OF_CONDUCT.md [llvm] Add CODE_OF_CONDUCT.md (#65816) 2023-09-09 10:55:31 -07:00
CONTRIBUTING.md Update CONTRIBUTING.md to remove the not about not accepting PR 2023-09-10 15:21:06 -07:00
LICENSE.TXT
README.md Add OpenSSF Best Practice Badge (#77398) 2024-01-13 07:43:11 -08:00
SECURITY.md

The LLVM Compiler Infrastructure

OpenSSF Scorecard OpenSSF Best Practices libc++

Welcome to the LLVM project!

This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.

The LLVM project has multiple components. The core of the project is itself called "LLVM". This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.

C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.

Other components include: the libc++ C++ standard library, the LLD linker, and more.

Getting the Source Code and Building LLVM

Consult the Getting Started with LLVM page for information on building and running LLVM.

For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.

Getting in touch

Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.

The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.