| commit | 06ee672fc5222009d38fa8334b0b5438645f2a66 | [log] [tgz] |
|---|---|---|
| author | Omar Ahmed <omar.ahmed@codeplay.com> | Wed May 28 14:40:00 2025 +0100 |
| committer | GitHub <noreply@github.com> | Wed May 28 07:40:00 2025 -0600 |
| tree | 14b3b234b72626ee481c00d745c759fa545bf855 | |
| parent | 59b7b5b6b5c032ed21049d631eb5d67091f3a21c [diff] |
[clang] Move opt level in clang toolchain to clang::ConstructJob start (#141036) We currently transfer the opt level from the user clang call to CC1 args at the end of the `ConstructJob` function, this might lead to bugs as `ConstructJob` is a big function and we easily could add a change that would return early from it. That would cause the opt level to not be transferred to CC1 args and lead to wrong opt level compilation and would be hard to spot. This PR moves the opt level to the beginning of the function as opt level should be a direct transfer without any problems, it also removes the redundancy where it was added 2 times through the function.
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.