Represent pass_object_size attrs in ExtParameterInfoThe goal of this is to fix a bug in modules where we'd mergeFunctionDecls that differed in their pass_object_size attributes. Sincewe can overl
Represent pass_object_size attrs in ExtParameterInfoThe goal of this is to fix a bug in modules where we'd mergeFunctionDecls that differed in their pass_object_size attributes. Sincewe can overload on the presence of pass_object_size attributes, thisbehavior is incorrect.We don't represent `N` in `pass_object_size(N)` as part ofExtParameterInfo, since it's an error to overload solely on the value ofN. This means that we have a bug if we have two modules that declarefunctions that differ only in their pass_object_size attrs, like so:// In module A, from a.hvoid foo(char *__attribute__((pass_object_size(0))));// In module B, from b.hvoid foo(char *__attribute__((pass_object_size(1))));// In module C, in main.c#include "a.h"#include "b.h"At the moment, we'll merge the foo decls, when we should instead emit adiagnostic about an invalid overload. We seem to have similar (silent)behavior if we overload only on the return type of `foo` instead; I'lltry to find a good place to put a FIXME (or I'll just file a bug) soon.This patch also fixes a bug where we'd not output the proper extendedparameter info for declarations with pass_object_size attrs.llvm-svn: 296076
show more ...
[Modules] Consider enable_if attrs in isSameEntity.Two functions that differ only in their enable_if attributes areconsidered overloads, so we should check for those when we're trying tofigure ou
[Modules] Consider enable_if attrs in isSameEntity.Two functions that differ only in their enable_if attributes areconsidered overloads, so we should check for those when we're trying tofigure out if two functions are mergeable.We need to do the same thing for pass_object_size, as well. Looks likethat'll be a bit less trivial, since we sometimes do these mergingchecks before we have pass_object_size attributes available (see themerge checks in ASTDeclReader::VisitFunctionDecl that happen before weread parameters, and merge checks in calls to ReadDeclAs<>()).llvm-svn: 295252