summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/cxx11-exception-spec.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup the handling of noinline function attributes, -fno-inline,Chandler Carruth2016-12-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -fno-inline-functions, -O0, and optnone. These were really, really tangled together: - We used the noinline LLVM attribute for -fno-inline - But not for -fno-inline-functions (breaking LTO) - But we did use it for -finline-hint-functions (yay, LTO is happy!) - But we didn't for -O0 (LTO is sad yet again...) - We had weird structuring of CodeGenOpts with both an inlining enumeration and a boolean. They interacted in weird ways and needlessly. - A *lot* of set smashing went on with setting these, and then got worse when we considered optnone and other inlining-effecting attributes. - A bunch of inline affecting attributes were managed in a completely different place from -fno-inline. - Even with -fno-inline we failed to put the LLVM noinline attribute onto many generated function definitions because they didn't show up as AST-level functions. - If you passed -O0 but -finline-functions we would run the normal inliner pass in LLVM despite it being in the O0 pipeline, which really doesn't make much sense. - Lastly, we used things like '-fno-inline' to manipulate the pass pipeline which forced the pass pipeline to be much more parameterizable than it really needs to be. Instead we can *just* use the optimization level to select a pipeline and control the rest via attributes. Sadly, this causes a bunch of churn in tests because we don't run the optimizer in the tests and check the contents of attribute sets. It would be awesome if attribute sets were a bit more FileCheck friendly, but oh well. I think this is a significant improvement and should remove the semantic need to change what inliner pass we run in order to comply with the requested inlining semantics by relying completely on attributes. It also cleans up tho optnone and related handling a bit. One unfortunate aspect of this is that for generating alwaysinline routines like those in OpenMP we end up removing noinline and then adding alwaysinline. I tried a bunch of other approaches, but because we recompute function attributes from scratch and don't have a declaration here I couldn't find anything substantially cleaner than this. Differential Revision: https://reviews.llvm.org/D28053 llvm-svn: 290398
* Fix broken tests from no-jump-table commitNirav Dave2016-04-051-7/+10
| | | | | | | | | | | | Summary: Fix failing tests from no-jump-table flag addition Reviewers: jyknight Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D18801 llvm-svn: 265439
* Update clang to take into account the changes to personality fnsDavid Majnemer2015-06-171-5/+5
| | | | llvm-svn: 239941
* [patch][pr19848] Produce explicit comdats in clang.Rafael Espindola2015-01-121-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | The llvm IR until recently had no support for comdats. This was a problem when targeting C++ on ELF/COFF as just using weak linkage would cause quite a bit of dead bits to remain on the executable (unless -ffunction-sections, -fdata-sections and --gc-sections were used). To fix the problem, llvm's codegen will just assume that any weak or linkonce that is not in an explicit comdat should be output in one with the same name as the global. This unfortunately breaks cases like pr19848 where a weak symbol is not xpected to be part of any comdat. Now that we have explicit comdats in the IR, we can finally get both cases right. This first patch just makes clang give explicit comdats to GlobalValues where t is allowed to. A followup patch to llvm will then stop implicitly producing comdats. llvm-svn: 225705
* Call ResolveExceptionSpec for non-OdrUsed functions.Nico Weber2014-08-271-0/+5
| | | | | | | | In C++11, instantiation of exception specs is deferred. The instantiation is done in MarkFunctionReferenced(), which wasn't called for non-OdrUsed functions, which then caused an assert in codegen. Fixes PR19190, see the bug for details. llvm-svn: 216562
* Remove 'not' from some CodeGen testsAlp Toker2013-12-141-1/+2
| | | | | | | | These were just missing an expected-no-diagnostics directive. Also add -std=c++11 to a test warning noisly about extensions. llvm-svn: 197308
* Add 'not' to commands that are expected to fail.Rafael Espindola2013-07-041-1/+1
| | | | | | | This is at least good documentation, but also opens the possibility of using pipefail. llvm-svn: 185652
* Add more of the command line options as attribute flags.Bill Wendling2013-02-281-6/+7
| | | | | | These can be easily queried by the back-end. llvm-svn: 176304
* Reapply r176133 with testcase fixes.Bill Wendling2013-02-271-37/+35
| | | | llvm-svn: 176145
* Revert "Add more attributes from the command line to functions."Anna Zaks2013-02-251-36/+37
| | | | | | | | This reverts commit 176009. The commit is a likely cause of several buildbot failures. llvm-svn: 176044
* Add more attributes from the command line to functions.Bill Wendling2013-02-251-37/+36
| | | | | | | This is an ongoing process. Any command line option which a back-end cares about should be added here. llvm-svn: 176009
* Modify the tests to use attribute group references instead of listing theBill Wendling2013-02-201-34/+38
| | | | | | function attributes. llvm-svn: 175606
* Add the 'target-cpu' and 'target-features' attributes to functions.Bill Wendling2013-02-151-10/+10
| | | | | | | The back-end will use these values to reconfigure code generation for different features. llvm-svn: 175308
* PR 12586: Fix assert while running libc++ testsuite: deal with exceptionRichard Smith2012-04-191-1/+55
| | | | | | | | | specifications on member function templates of class templates and other such nested beasties. Store the function template from which we are to instantiate an exception specification rather than trying to deduce it. Plus some additional test cases. llvm-svn: 155076
* PR12569: Instantiate exception specifications of explicit instantiationsRichard Smith2012-04-171-8/+56
| | | | | | and explicit specializations of function templates appropriately. llvm-svn: 154956
* Implement DR1330 in C++11 mode, to support libstdc++4.7 which uses it.Richard Smith2012-04-171-0/+18
We have a new flavor of exception specification, EST_Uninstantiated. A function type with this exception specification carries a pointer to a FunctionDecl, and the exception specification for that FunctionDecl is instantiated (if needed) and used in the place of the function type's exception specification. When a function template declaration with a non-trivial exception specification is instantiated, the specialization's exception specification is set to this new 'uninstantiated' kind rather than being instantiated immediately. Expr::CanThrow has migrated onto Sema, so it can instantiate exception specs on-demand. Also, any odr-use of a function triggers the instantiation of its exception specification (the exception specification could be needed by IRGen). In passing, fix two places where a DeclRefExpr was created but the corresponding function was not actually marked odr-used. We used to get away with this, but don't any more. Also fix a bug where instantiating an exception specification which refers to function parameters resulted in a crash. We still have the same bug in default arguments, which I'll be looking into next. This, plus a tiny patch to fix libstdc++'s common_type, is enough for clang to parse (and, in very limited testing, support) all of libstdc++4.7's standard headers. llvm-svn: 154886
OpenPOWER on IntegriCloud