mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-04 20:20:54 +00:00
For NetBSD, unwind data is emitted by default, so also enable frame
pointer optimisation by default when using optimisation. llvm-svn: 337274
This commit is contained in:
parent
e1016f1bc7
commit
2ad8210725
@ -524,6 +524,10 @@ static bool useFramePointerForTargetByDefault(const ArgList &Args,
|
||||
break;
|
||||
}
|
||||
|
||||
if (Triple.getOS() == llvm::Triple::NetBSD) {
|
||||
return !areOptimizationsEnabled(Args);
|
||||
}
|
||||
|
||||
if (Triple.isOSLinux() || Triple.getOS() == llvm::Triple::CloudABI) {
|
||||
switch (Triple.getArch()) {
|
||||
// Don't use a frame pointer on linux if optimizing for certain targets.
|
||||
|
@ -17,6 +17,15 @@
|
||||
// RUN: FileCheck --check-prefix=CLOUDABI %s
|
||||
// CLOUDABI-NOT: "-momit-leaf-frame-pointer"
|
||||
|
||||
// NetBSD follows the same rules as Linux.
|
||||
// RUN: %clang -### -target x86_64-unknown-netbsd -S -O1 %s 2>&1 | \
|
||||
// RUN: FileCheck --check-prefix=NETBSD-OPT %s
|
||||
// NETBSD-OPT: "-momit-leaf-frame-pointer"
|
||||
|
||||
// RUN: %clang -### -target x86_64-unknown-netbsd -S %s 2>&1 | \
|
||||
// RUN: FileCheck --check-prefix=NETBSD %s
|
||||
// NETBSD-NOT: "-momit-leaf-frame-pointer"
|
||||
|
||||
// Darwin disables omitting the leaf frame pointer even under optimization
|
||||
// unless the command lines are given.
|
||||
// RUN: %clang -### -target i386-apple-darwin -S %s 2>&1 | \
|
||||
|
Loading…
Reference in New Issue
Block a user