When inlining disciriminator info about the call statement is lost which
is not good for auto-profile and debug info quality. This patch fixes
it.
gcc/ChangeLog:
* tree-inline.cc (expand_call_inline): Preserve discriminator.
loc = LOCATION_LOCUS (DECL_SOURCE_LOCATION (fn));
if (loc == UNKNOWN_LOCATION)
loc = BUILTINS_LOCATION;
+ if (has_discriminator (gimple_location (stmt)))
+ loc = location_with_discriminator
+ (loc, get_discriminator_from_loc (gimple_location (stmt)));
id->block = make_node (BLOCK);
BLOCK_ABSTRACT_ORIGIN (id->block) = DECL_ORIGIN (fn);
BLOCK_SOURCE_LOCATION (id->block) = loc;