aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPranil Dey <mkdeyp@gmail.com>2024-08-30 21:31:26 +0530
committerPranil Dey <mkdeyp@gmail.com>2024-10-01 09:48:04 +0530
commit70505f5757f09145f4465f5cf597ecc2b64069e0 (patch)
tree3c308413389b98cfc515ccaf3fb5302372c89725
parentba70ece43622eb4da97455fb78c42c7e9c7f8ce6 (diff)
downloadgcc-70505f5757f09145f4465f5cf597ecc2b64069e0.zip
gcc-70505f5757f09145f4465f5cf597ecc2b64069e0.tar.gz
gcc-70505f5757f09145f4465f5cf597ecc2b64069e0.tar.bz2
Fixed some indentations and function names
1. Changed function name extract_exception_types_for_call to extract_types_for_call due to length of the name 2. Fixed space indentation in some places
-rw-r--r--gcc/tree-eh.cc32
1 files changed, 16 insertions, 16 deletions
diff --git a/gcc/tree-eh.cc b/gcc/tree-eh.cc
index 4d541b0..e7e4bd1 100644
--- a/gcc/tree-eh.cc
+++ b/gcc/tree-eh.cc
@@ -2293,7 +2293,7 @@ same_or_derived_type (tree t1, tree t2)
}
// Check if a landing pad can handle any of the given exception types
-bool match_lp(eh_landing_pad lp, vec<tree> *exception_types) {
+bool match_lp (eh_landing_pad lp, vec<tree> *exception_types) {
eh_region region = lp->region;
// Ensure the region is of type ERT_TRY
@@ -2303,15 +2303,15 @@ bool match_lp(eh_landing_pad lp, vec<tree> *exception_types) {
while (catch_handler) {
tree type_list = catch_handler->type_list;
- if(type_list == NULL) {
+ if (type_list == NULL) {
return true;
}
- for (tree t = type_list; t; t = TREE_CHAIN(t)) {
- tree type = TREE_VALUE(t);
- for (unsigned i = 0; i < exception_types->length(); ++i) {
+ for (tree t = type_list; t; t = TREE_CHAIN (t)) {
+ tree type = TREE_VALUE (t);
+ for (unsigned i = 0; i < exception_types->length (); ++i) {
// match found or a catch-all handler (NULL)
- if (!type || same_or_derived_type ((*exception_types)[i], type)) {
+ if (!type || same_or_derived_type ( (*exception_types)[i], type)) {
return true;
}
}
@@ -2323,18 +2323,18 @@ bool match_lp(eh_landing_pad lp, vec<tree> *exception_types) {
}
// Function to update landing pad in throw_stmt_table for a given statement
-void update_stmt_eh_region(gimple *stmt) {
+void update_stmt_eh_region (gimple *stmt) {
auto_vec<tree> exception_types;
if (!stmt_throw_types (cfun, stmt, &exception_types)) {
return;
}
- int lp_nr = lookup_stmt_eh_lp_fn(cfun, stmt);
+ int lp_nr = lookup_stmt_eh_lp_fn (cfun, stmt);
if (lp_nr <= 0) {
return;
}
- eh_landing_pad lp = get_eh_landing_pad_from_number(lp_nr);
+ eh_landing_pad lp = get_eh_landing_pad_from_number (lp_nr);
if (!lp) {
return;
}
@@ -2345,12 +2345,12 @@ void update_stmt_eh_region(gimple *stmt) {
while (region) {
switch (region->type) {
case ERT_CLEANUP:
- *cfun->eh->throw_stmt_table->get(const_cast<gimple *>(stmt)) = lp->index;
+ *cfun->eh->throw_stmt_table->get (const_cast<gimple *> (stmt)) = lp->index;
return;
case ERT_TRY:
- if (match_lp(lp, &exception_types)) {
- *cfun->eh->throw_stmt_table->get(const_cast<gimple *>(stmt)) = lp->index;
+ if (match_lp (lp, &exception_types)) {
+ *cfun->eh->throw_stmt_table->get (const_cast<gimple *> (stmt)) = lp->index;
return;
}
break;
@@ -2360,7 +2360,7 @@ void update_stmt_eh_region(gimple *stmt) {
return;
case ERT_ALLOWED_EXCEPTIONS:
- if (!match_lp(lp, &exception_types)) {
+ if (!match_lp (lp, &exception_types)) {
return;
}
break;
@@ -2371,7 +2371,7 @@ void update_stmt_eh_region(gimple *stmt) {
region = region->outer;
}
- remove_stmt_from_eh_lp_fn(cfun, stmt);
+ remove_stmt_from_eh_lp_fn (cfun, stmt);
}
/* Create the single EH edge from STMT to its nearest landing pad,
@@ -3016,7 +3016,7 @@ stmt_could_throw_1_p (gassign *stmt)
return false;
}
-void extract_exception_types_for_call (gcall *call_stmt, vec<tree> *ret_vector) {
+void extract_types_for_call (gcall *call_stmt, vec<tree> *ret_vector) {
tree callee = gimple_call_fndecl (call_stmt);
if (callee == NULL_TREE) {
return;
@@ -3045,7 +3045,7 @@ bool stmt_throw_types (function *fun, gimple *stmt, vec<tree> *ret_vector) {
switch (gimple_code (stmt)) {
case GIMPLE_CALL:
- extract_exception_types_for_call (as_a<gcall*> (stmt), ret_vector);
+ extract_types_for_call (as_a<gcall*> (stmt), ret_vector);
return !ret_vector->is_empty ();
default: