[all-commits] [llvm/llvm-project] 06ee67: [clang] Move opt level in clang toolchain to clang...
Omar Ahmed via All-commits
all-commits at lists.llvm.org
Wed May 28 06:40:22 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 06ee672fc5222009d38fa8334b0b5438645f2a66
https://github.com/llvm/llvm-project/commit/06ee672fc5222009d38fa8334b0b5438645f2a66
Author: Omar Ahmed <omar.ahmed at codeplay.com>
Date: 2025-05-28 (Wed, 28 May 2025)
Changed paths:
M clang/lib/Driver/ToolChains/Clang.cpp
M clang/test/Driver/Ofast.c
M clang/test/Driver/cl-options.c
M clang/test/Driver/clang-translation.c
M clang/test/Driver/offload-Xarch.c
Log Message:
-----------
[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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list