summaryrefslogtreecommitdiff
path: root/gcc/c-family/c-ubsan.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2014-03-26 19:33:40 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2014-03-26 19:33:40 +0000
commitd4d068c0658a2e72c547da0208564ba4d526c51d (patch)
tree7671e1cf802c65b5fe7f9759f0228d4c032719aa /gcc/c-family/c-ubsan.c
parent58e9c2b3d0669e196aecf7b00287dc78f2417127 (diff)
downloadgcc-d4d068c0658a2e72c547da0208564ba4d526c51d.tar.gz
* ubsan.h (ubsan_create_data): Change second argument's type
to const location_t *. * ubsan.c (ubsan_source_location): If xloc.file is NULL, set it to _("<unknown>"). (ubsan_create_data): Change second argument to const location_t *PLOC. Create Loc field whenever PLOC is non-NULL. (ubsan_instrument_unreachable, ubsan_expand_null_ifn, ubsan_build_overflow_builtin, instrument_bool_enum_load): Adjust callers. c-family/ * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift, ubsan_instrument_vla, ubsan_instrument_return): Adjust ubsan_create_data callers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208849 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-family/c-ubsan.c')
-rw-r--r--gcc/c-family/c-ubsan.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/c-family/c-ubsan.c b/gcc/c-family/c-ubsan.c
index 610c010bdde..dc4d98147b3 100644
--- a/gcc/c-family/c-ubsan.c
+++ b/gcc/c-family/c-ubsan.c
@@ -73,7 +73,7 @@ ubsan_instrument_division (location_t loc, tree op0, tree op1)
make sure it gets evaluated before the condition. */
t = fold_build2 (COMPOUND_EXPR, TREE_TYPE (t), op0, t);
tree data = ubsan_create_data ("__ubsan_overflow_data",
- loc, NULL,
+ &loc, NULL,
ubsan_type_descriptor (type, false),
NULL_TREE);
data = build_fold_addr_expr_loc (loc, data);
@@ -142,7 +142,7 @@ ubsan_instrument_shift (location_t loc, enum tree_code code,
make sure it gets evaluated before the condition. */
t = fold_build2 (COMPOUND_EXPR, TREE_TYPE (t), op0, t);
tree data = ubsan_create_data ("__ubsan_shift_data",
- loc, NULL,
+ &loc, NULL,
ubsan_type_descriptor (type0, false),
ubsan_type_descriptor (type1, false),
NULL_TREE);
@@ -169,7 +169,7 @@ ubsan_instrument_vla (location_t loc, tree size)
t = fold_build2 (LE_EXPR, boolean_type_node, size, build_int_cst (type, 0));
tree data = ubsan_create_data ("__ubsan_vla_data",
- loc, NULL,
+ &loc, NULL,
ubsan_type_descriptor (type, false),
NULL_TREE);
data = build_fold_addr_expr_loc (loc, data);
@@ -185,7 +185,7 @@ ubsan_instrument_vla (location_t loc, tree size)
tree
ubsan_instrument_return (location_t loc)
{
- tree data = ubsan_create_data ("__ubsan_missing_return_data", loc,
+ tree data = ubsan_create_data ("__ubsan_missing_return_data", &loc,
NULL, NULL_TREE);
tree t = builtin_decl_explicit (BUILT_IN_UBSAN_HANDLE_MISSING_RETURN);
return build_call_expr_loc (loc, t, 1, build_fold_addr_expr_loc (loc, data));