[clang] [Driver] Allow -fbasic-block-address-map for AArch64 ELF (PR #82662)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 22 09:46:10 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-driver
@llvm/pr-subscribers-clang
Author: Daniel Hoekwater (dhoekwater)
<details>
<summary>Changes</summary>
Emitting the basic block address map with
`-fbasic-block-sections=labels` is allowed for AArch64 ELF since
7eaf94fefa1250fc8a46982cea8ce99abacae11f. Allow doing so with
`-fbasic-block-address-map`.
---
Full diff: https://github.com/llvm/llvm-project/pull/82662.diff
1 Files Affected:
- (modified) clang/lib/Driver/ToolChains/Clang.cpp (+1-1)
``````````diff
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index 7c0409f0c3097a..22c9b5e76710db 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -5958,7 +5958,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
if (Arg *A = Args.getLastArg(options::OPT_fbasic_block_address_map,
options::OPT_fno_basic_block_address_map)) {
- if (Triple.isX86() && Triple.isOSBinFormatELF()) {
+ if ((Triple.isX86() || Triple.isAArch64()) && Triple.isOSBinFormatELF()) {
if (A->getOption().matches(options::OPT_fbasic_block_address_map))
A->render(Args, CmdArgs);
} else {
``````````
</details>
https://github.com/llvm/llvm-project/pull/82662
More information about the cfe-commits
mailing list