commit | 33cd00f8c82d5df45b1dfd59310929a4d315fd8e | [log] [tgz] |
---|---|---|
author | Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com> | Fri Mar 28 08:17:31 2025 -0500 |
committer | GitHub <noreply@github.com> | Fri Mar 28 08:17:31 2025 -0500 |
tree | 13c5cdadf514a57dfd6878c2478784ec06a23a00 | |
parent | a481452cd88acc180f82dd5631257c8954ed7812 [diff] |
[flang] Use more generic overload for Operation in Traverse (#133305) Currently there are two specific overloads: for unary operations, i.e. `Operation<D, R, O>`, and binary ones `Operation<D, R, LO, RO>`. This makes it impossible for a derived class to use a single overload to handle all types of operations: `Operation<D, R, O...>`. Since the base overloads need to be included in the derived class's scope, via `using Base::operator()` either one of the specific overloads will always be a better candidate than the more generic derived one. ``` class MyVisitor : public Traverse<...> { using Traverse<...>::operator(); template <typename D, typename R, typename... O> Result operator()(const Operation<D, R, O...> &op) const { // Will never be used. } }; ``` This patch replaces the two specific overloads for Operation in Traverse with a single generic overload, while preserving the existing functionality, and allowing derived classes to use a single overload as well.
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.
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.
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.