[PATCH] D45237: [RISCV] Fix logic check if frame pointer should be used
Mandeep Singh Grang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 3 16:06:01 PDT 2018
mgrang created this revision.
mgrang added a reviewer: asb.
Herald added subscribers: shiva0217, kito-cheng.
The logic was broken for Linux triples as it returns true in the switch for Triple.isOSLinux().
Repository:
rC Clang
https://reviews.llvm.org/D45237
Files:
lib/Driver/ToolChains/Clang.cpp
Index: lib/Driver/ToolChains/Clang.cpp
===================================================================
--- lib/Driver/ToolChains/Clang.cpp
+++ lib/Driver/ToolChains/Clang.cpp
@@ -529,6 +529,9 @@
// XCore never wants frame pointers, regardless of OS.
// WebAssembly never wants frame pointers.
return false;
+ case llvm::Triple::riscv32:
+ case llvm::Triple::riscv64:
+ return !areOptimizationsEnabled(Args);
default:
break;
}
@@ -552,14 +555,6 @@
}
}
- switch (Triple.getArch()) {
- case llvm::Triple::riscv32:
- case llvm::Triple::riscv64:
- return !areOptimizationsEnabled(Args);
- default:
- break;
- }
-
if (Triple.isOSWindows()) {
switch (Triple.getArch()) {
case llvm::Triple::x86:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45237.140878.patch
Type: text/x-patch
Size: 767 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180403/7406edea/attachment.bin>
More information about the cfe-commits
mailing list