[PATCH] D27163: Introduce -f[no-]strict-return flag that controls code generation for C++'s undefined behaviour return optimisation
Alex Lorenz via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 29 06:20:44 PST 2016
arphaman updated this revision to Diff 79556.
arphaman added a comment.
The updated diff has the following changes:
- The default value for '-fstrict-return' is now the same across all platforms, the Darwin specific -fno-strict-return was removed.
- The 'fno-strict-return' optimisation avoidance can only be done by functions that return trivially copyable types.
- A new test verifies that Objective-C++ methods and blocks never get the return optimisation regardless of the '-fstrict-return' flag.
- The updated test adds explanation comments and uses Mehdi's advice for LABEL checks and common prefix.
Repository:
rL LLVM
https://reviews.llvm.org/D27163
Files:
include/clang/AST/Decl.h
include/clang/Basic/LangOptions.def
include/clang/Driver/Options.td
include/clang/Frontend/CodeGenOptions.def
include/clang/Sema/AnalysisBasedWarnings.h
include/clang/Sema/Sema.h
lib/CodeGen/CodeGenFunction.cpp
lib/Driver/Tools.cpp
lib/Frontend/CompilerInvocation.cpp
lib/Sema/AnalysisBasedWarnings.cpp
lib/Sema/Sema.cpp
test/CodeGenCXX/return.cpp
test/CodeGenObjCXX/return.mm
test/Driver/clang_f_opts.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27163.79556.patch
Type: text/x-patch
Size: 17233 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161129/f956a437/attachment-0001.bin>
More information about the cfe-commits
mailing list