llvm-project/llvm/tools
Nikita Popov da34966a5a [llvm-c] Add LLVMGetAggregateElement() function
This adds LLVMGetAggregateElement() as a wrapper for
Constant::getAggregateElement(), which allows fetching a
struct/array/vector element without handling different possible
underlying representations.

As the changed echo test shows, previously you for example had to
treat ConstantArray (use LLVMGetOperand) and ConstantDataArray
(use LLVMGetElementAsConstant) separately, not to mention all the
other possible representations (like PoisonValue).

I've deprecated LLVMGetElementAsConstant() in favor of the new
function, which is strictly more powerful (but I could be convinced
to drop the deprecation).

This is partly motivated by https://reviews.llvm.org/D125795,
which drops LLVMConstExtractValue() because the underlying constant
expression no longer exists. This function could previously be used
as a poor man's getAggregateElement().

Differential Revision: https://reviews.llvm.org/D128417
2022-06-23 14:50:54 +02:00
..
bugpoint Remove unneeded cl::ZeroOrMore for cl::opt/cl::list options 2022-06-05 01:07:51 -07:00
bugpoint-passes Add missed rename of getFnAttributes() -> getFnAttrs() 2021-08-13 11:29:20 -07:00
dsymutil [dsymutil] Fix std::unique_ptr to llvm::Expected conversion 2022-06-14 16:10:48 -07:00
dxil-dis Add DXIL Bitcode Writer and DXIL testing 2022-04-15 18:50:26 -05:00
gold Fix compilation in gold-plugin triggered by D125847 2022-06-01 18:51:35 -07:00
llc [llvm] Don't use Optional::hasValue (NFC) 2022-06-20 10:38:12 -07:00
lli [ORC][ORC_RT] Integrate ORC platforms with LLJIT and lli 2022-06-09 22:47:58 -07:00
llvm-ar LLVM Driver Multicall tool 2022-06-06 04:27:32 +00:00
llvm-as [BitcodeWriter] Fix cases of some functions 2022-01-31 16:46:11 -08:00
llvm-as-fuzzer [Support] Change fatal_error_handler_t to take a const char* instead of std::string 2021-10-05 10:55:40 +01:00
llvm-bcanalyzer [BitcodeAnalyzer] allow a motivated user to dump BLOCKINFO 2021-10-10 10:15:14 +05:30
llvm-c-test [llvm-c] Add LLVMGetAggregateElement() function 2022-06-23 14:50:54 +02:00
llvm-cat Remove unneeded cl::ZeroOrMore for cl::list options 2022-06-04 23:51:13 -07:00
llvm-cfi-verify Cleanup include: DebugInfo/Symbolize 2022-02-24 13:25:11 +01:00
llvm-config [docs] [tools] Document and alphabetize all llvm-config command-line options 2022-03-31 08:44:10 +01:00
llvm-cov [llvm] Don't use Optional::getValue (NFC) 2022-06-20 22:45:45 -07:00
llvm-cvtres [tools] Delete redundant 'static' from namespace scope 'static const'. NFC 2021-10-18 22:38:42 -07:00
llvm-cxxdump Remove unneeded cl::ZeroOrMore for cl::opt/cl::list options 2022-06-05 00:31:44 -07:00
llvm-cxxfilt [llvm-cxxfilt] Add description for --types in help text 2022-06-14 10:32:56 +01:00
llvm-cxxmap
llvm-debuginfod-find [Debuginfod] Fix shared libs build break after eafa053041 2022-05-18 17:33:12 -05:00
llvm-diff [llvm] Cleanup header dependencies in ADT and Support 2022-01-21 13:54:49 +01:00
llvm-dis Remove unneeded cl::ZeroOrMore for cl::list options 2022-06-04 23:51:13 -07:00
llvm-dis-fuzzer [Bitcode] Add missing includes in llvm-dis-fuzzer 2022-02-08 09:49:38 +01:00
llvm-dlang-demangle-fuzzer Reland "[FuzzMutate] Split out FuzzerCLI library that doesn't depend on IR." 2022-05-07 13:49:54 +02:00
llvm-driver LLVM Driver Multicall tool 2022-06-06 04:27:32 +00:00
llvm-dwarfdump Remove unneeded cl::ZeroOrMore for cl::opt/cl::list options 2022-06-05 01:07:51 -07:00
llvm-dwp [MC] De-capitalize MCStreamer functions 2022-06-07 00:31:02 -07:00
llvm-exegesis [tools] Forward declare classes & remove includes 2022-06-03 16:32:04 -07:00
llvm-extract Remove unneeded cl::ZeroOrMore for cl::opt/cl::list options 2022-06-05 01:07:51 -07:00
llvm-go [AIX][llvm-go] AIX linker does not recognize `-rpath` 2021-11-15 13:13:08 -05:00
llvm-gsymutil Remove unneeded cl::ZeroOrMore for cl::opt/cl::list options 2022-06-05 01:07:51 -07:00
llvm-ifs [llvm] Don't use Optional::getValue (NFC) 2022-06-20 22:45:45 -07:00
llvm-isel-fuzzer Remove unneeded cl::ZeroOrMore for cl::opt/cl::list options 2022-06-05 00:31:44 -07:00
llvm-itanium-demangle-fuzzer Reland "[FuzzMutate] Split out FuzzerCLI library that doesn't depend on IR." 2022-05-07 13:49:54 +02:00
llvm-jitlink Remove unneeded cl::ZeroOrMore for cl::opt/cl::list options 2022-06-05 01:07:51 -07:00
llvm-jitlistener
llvm-libtool-darwin Remove unneeded cl::ZeroOrMore for cl::opt/cl::list options 2022-06-05 01:07:51 -07:00
llvm-link Remove unneeded cl::ZeroOrMore for cl::opt/cl::list options 2022-06-05 00:31:44 -07:00
llvm-lipo [llvm-lipo] Don't use a global LLVMContext 2022-03-21 10:43:22 -07:00
llvm-lto [llvm] Don't use Optional::getValue (NFC) 2022-06-20 22:45:45 -07:00
llvm-lto2 [llvm] Don't use Optional::getValue (NFC) 2022-06-20 22:45:45 -07:00
llvm-mc [NFC][MC] remove unused argument `MCRegisterInfo` in `MCCodeEmitter` 2022-02-16 13:10:09 +08:00
llvm-mc-assemble-fuzzer Remove unneeded cl::ZeroOrMore for cl::list options 2022-06-04 23:51:13 -07:00
llvm-mc-disassemble-fuzzer Remove unneeded cl::ZeroOrMore for cl::list options 2022-06-04 23:51:13 -07:00
llvm-mca [llvm] Use value_or instead of getValueOr (NFC) 2022-06-18 23:07:11 -07:00
llvm-microsoft-demangle-fuzzer Reland "[FuzzMutate] Split out FuzzerCLI library that doesn't depend on IR." 2022-05-07 13:49:54 +02:00
llvm-ml [llvm-ml] Remove all file extension restrictions 2022-06-07 13:03:19 -04:00
llvm-modextract Cleanup includes: DebugInfo & CodeGen 2022-03-12 17:26:40 +01:00
llvm-mt [llvm-mt] Add support /notify_update 2022-03-11 03:46:46 +00:00
llvm-nm [llvm-nm][docs] Document -W and -U 2022-05-23 09:58:54 -07:00
llvm-objcopy LLVM Driver Multicall tool 2022-06-06 04:27:32 +00:00
llvm-objdump [llvm] Don't use Optional::getValue (NFC) 2022-06-20 22:45:45 -07:00
llvm-opt-fuzzer Reland "[FuzzMutate] Split out FuzzerCLI library that doesn't depend on IR." 2022-05-07 13:49:54 +02:00
llvm-opt-report Cleanup LLVMRemarks includes 2022-01-31 11:16:28 +01:00
llvm-pdbutil [llvm] Don't use Optional::hasValue (NFC) 2022-06-20 10:38:12 -07:00
llvm-profdata [llvm] Remove unneeded cl::ZeroOrMore for cl::opt options. NFC 2022-06-03 21:59:05 -07:00
llvm-profgen [llvm] Don't use Optional::hasValue (NFC) 2022-06-20 10:38:12 -07:00
llvm-rc [llvm] Use value_or instead of getValueOr (NFC) 2022-06-18 23:07:11 -07:00
llvm-readobj [llvm] Don't use Optional::hasValue (NFC) 2022-06-20 10:38:12 -07:00
llvm-reduce stop llvm-reduce from introducing undefs 2022-06-22 20:41:23 -06:00
llvm-remark-size-diff Add JSON output option to llvm-remark-size-diff 2022-03-07 16:53:27 -08:00
llvm-rtdyld Remove unneeded cl::ZeroOrMore for cl::opt/cl::list options 2022-06-05 01:07:51 -07:00
llvm-rust-demangle-fuzzer Reland "[FuzzMutate] Split out FuzzerCLI library that doesn't depend on IR." 2022-05-07 13:49:54 +02:00
llvm-shlib [cmake][NFC] Configuration for libLLVM.so symbol versioning 2022-02-01 23:05:03 -08:00
llvm-sim
llvm-size
llvm-special-case-list-fuzzer Reland "[FuzzMutate] Split out FuzzerCLI library that doesn't depend on IR." 2022-05-07 13:49:54 +02:00
llvm-split [llvm] Cleanup header dependencies in ADT and Support 2022-01-21 13:54:49 +01:00
llvm-stress [llvm-stress] Remove global LLVMContext 2022-03-21 13:55:08 -07:00
llvm-strings Remove unneeded cl::ZeroOrMore for cl::opt/cl::list options 2022-06-05 01:07:51 -07:00
llvm-symbolizer [Debuginfod] Add BUILD_ID syntax to llvm-symbolizer. 2022-02-25 00:39:13 +00:00
llvm-tapi-diff Cleanup LLVMObject headers 2022-02-10 21:13:44 +01:00
llvm-tli-checker Fix warnings about variables that are set but only used in debug mode 2022-04-06 10:01:46 +03:00
llvm-undname Remove unneeded cl::ZeroOrMore for cl::opt/cl::list options 2022-06-05 00:31:44 -07:00
llvm-xray Cleanup include: DebugInfo/Symbolize 2022-02-24 13:25:11 +01:00
llvm-yaml-numeric-parser-fuzzer Reland "[FuzzMutate] Split out FuzzerCLI library that doesn't depend on IR." 2022-05-07 13:49:54 +02:00
llvm-yaml-parser-fuzzer Reland "[FuzzMutate] Split out FuzzerCLI library that doesn't depend on IR." 2022-05-07 13:49:54 +02:00
lto Remove unneeded cl::ZeroOrMore for cl::opt/cl::list options 2022-06-05 00:31:44 -07:00
obj2yaml [llvm] Don't use Optional::getValue (NFC) 2022-06-20 22:45:45 -07:00
opt Remove unneeded cl::ZeroOrMore for cl::opt/cl::list options 2022-06-05 01:07:51 -07:00
opt-viewer [llvm] Use `GNUInstallDirs` to support custom installation dirs 2022-01-08 00:47:31 +00:00
remarks-shlib [llvm] Use `GNUInstallDirs` to support custom installation dirs 2022-01-08 00:47:31 +00:00
sancov [LLVM][sancov] Inclusive language: Add -ignorelist option 2022-05-09 11:06:08 -04:00
sanstats Cleanup include: DebugInfo/Symbolize 2022-02-24 13:25:11 +01:00
split-file [split-file] Respect input file's line endings 2022-01-21 18:45:03 -06:00
verify-uselistorder [UseListOrder] Fix use list order for function operands 2021-09-07 20:59:12 +02:00
vfabi-demangle-fuzzer [NFC] Inclusive language: Remove instances of master in URLs 2021-11-05 08:48:41 -05:00
xcode-toolchain
yaml2obj Have yaml2obj describe all options in --help 2021-11-24 07:44:52 -08:00
CMakeLists.txt LLVM Driver Multicall tool 2022-06-06 04:27:32 +00:00