Skip to content

Commit

Permalink
[GDC] Do not set TREE_NOTHROW for nothrow functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jpf91 committed Jan 15, 2014
1 parent e8d7237 commit 9bb8b80
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 7 additions & 0 deletions gcc/d/ChangeLog
@@ -1,3 +1,10 @@
2014-01-14 Johannes Pfau <johannespfau@gmail.com>

* d-decls.cc(FuncDeclaration::toSymbol): Do not set TREE_NOTHROW on
nothrow functions.
* d-decls.cc(TypeInfoDeclaration::toSymbol): Call relayout_decl after
changing the type.

2014-01-02 Iain Buclaw <ibuclaw@gdcproject.org>

* d-objfile.cc(setup_symbol_storage): Use output_module_p on template
Expand Down
4 changes: 1 addition & 3 deletions gcc/d/d-decls.cc
Expand Up @@ -215,6 +215,7 @@ TypeInfoDeclaration::toSymbol (void)
// given TypeInfo. It is the actual data, not a reference
gcc_assert (TREE_CODE (TREE_TYPE (csym->Stree)) == REFERENCE_TYPE);
TREE_TYPE (csym->Stree) = TREE_TYPE (TREE_TYPE (csym->Stree));
relayout_decl (csym->Stree);
TREE_USED (csym->Stree) = 1;

// Built-in typeinfo will be referenced as one-only.
Expand Down Expand Up @@ -387,9 +388,6 @@ FuncDeclaration::toSymbol (void)
if (isPure() == PUREstrong && vthis == NULL
&& ftype->isnothrow && ftype->retStyle() == RETstack)
DECL_PURE_P (fndecl) = 1;

if (ftype->isnothrow)
TREE_NOTHROW (fndecl) = 1;
}

#if TARGET_DLLIMPORT_DECL_ATTRIBUTES
Expand Down

0 comments on commit 9bb8b80

Please sign in to comment.