Implement string comparison
This commit is contained in:
@ -1,3 +1,20 @@
|
||||
/* Builtin definitions.
|
||||
Copyright (C) 2025 Free Software Foundation, Inc.
|
||||
|
||||
GCC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GCC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GCC; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "elna/gcc/elna-builtins.h"
|
||||
#include "elna/gcc/elna1.h"
|
||||
#include "stor-layout.h"
|
||||
@ -18,13 +35,15 @@ namespace gcc
|
||||
elna_float_type_node = double_type_node;
|
||||
|
||||
elna_string_type_node = make_node(RECORD_TYPE);
|
||||
tree_chain record_chain;
|
||||
tree string_ptr_type = build_pointer_type_for_mode(elna_char_type_node, VOIDmode, true);
|
||||
tree record_chain = NULL_TREE;
|
||||
|
||||
record_chain.append(build_field(UNKNOWN_LOCATION, elna_string_type_node, "length", elna_word_type_node));
|
||||
record_chain.append(build_field(UNKNOWN_LOCATION, elna_string_type_node, "ptr",
|
||||
build_pointer_type_for_mode(elna_char_type_node, VOIDmode, true)));
|
||||
record_chain = chainon(record_chain,
|
||||
build_field(UNKNOWN_LOCATION, elna_string_type_node, "length", elna_word_type_node));
|
||||
record_chain = chainon(record_chain,
|
||||
build_field(UNKNOWN_LOCATION, elna_string_type_node, "ptr", string_ptr_type));
|
||||
|
||||
TYPE_FIELDS(elna_string_type_node) = record_chain.head();
|
||||
TYPE_FIELDS(elna_string_type_node) = record_chain;
|
||||
layout_type(elna_string_type_node);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user