Skip to content

Commit

Permalink
gcc/objc:
Browse files Browse the repository at this point in the history
	PR target/47997
	* objc-act.c (objc_build_string_object): Remove redundant second
	call to fix_string_type ().  Add a checking assert that we are,
	indeed, passed a STRING_CST.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180653 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
iains committed Oct 29, 2011
1 parent 3b9a92b commit 8a8f7a5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 7 additions & 0 deletions gcc/objc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2011-10-29 Iain Sandoe <[email protected]>

PR target/47997
* objc-act.c (objc_build_string_object): Remove redundant second
call to fix_string_type (). Add a checking assert that we are,
indeed, passed a STRING_CST.

2011-10-18 Mikael Pettersson <[email protected]>

PR objc/50743
Expand Down
5 changes: 2 additions & 3 deletions gcc/objc/objc-act.c
Original file line number Diff line number Diff line change
Expand Up @@ -3128,9 +3128,8 @@ objc_build_string_object (tree string)
struct string_descriptor *desc, key;
void **loc;

/* Prep the string argument. */
string = fix_string_type (string);
TREE_SET_CODE (string, STRING_CST);
/* We should be passed a STRING_CST. */
gcc_checking_assert (TREE_CODE (string) == STRING_CST);
length = TREE_STRING_LENGTH (string) - 1;

/* The target may have different ideas on how to construct an ObjC string
Expand Down

0 comments on commit 8a8f7a5

Please sign in to comment.