[clang] [clang][ARM] disable frame pointers by default for bare metal ARM targets (PR #117140)
Petr Hosek via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 2 10:08:54 PST 2024
================
@@ -128,12 +128,14 @@ BareMetal::BareMetal(const Driver &D, const llvm::Triple &Triple,
}
}
+namespace clang {
+namespace driver {
+namespace toolchains {
/// Is the triple {arm,armeb,thumb,thumbeb}-none-none-{eabi,eabihf} ?
-static bool isARMBareMetal(const llvm::Triple &Triple) {
- if (Triple.getArch() != llvm::Triple::arm &&
- Triple.getArch() != llvm::Triple::thumb &&
- Triple.getArch() != llvm::Triple::armeb &&
- Triple.getArch() != llvm::Triple::thumbeb)
+bool isARMEABIBareMetal(const llvm::Triple &Triple) {
----------------
petrhosek wrote:
I'd consider moving this function to https://github.com/llvm/llvm-project/blob/c16c0e26236d0468a2411cb3bce219d3c70650e9/clang/lib/Driver/ToolChains/Arch/ARM.cpp, I think that would be a more appropriate location since that's where we keep other similar utility functions.
https://github.com/llvm/llvm-project/pull/117140
More information about the cfe-commits
mailing list