/* Mudflap: narrow-pointer bounds-checking by tree rewriting.
- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
Free Software Foundation, Inc.
Contributed by Frank Ch. Eigler <fche@redhat.com>
and Graydon Hoare <graydon@redhat.com>
const char *sourcefile;
unsigned sourceline = xloc.line;
unsigned sourcecolumn = 0;
-#ifdef USE_MAPPED_LOCATION
sourcecolumn = xloc.column;
-#endif
sourcefile = xloc.file;
if (sourcefile == NULL && current_function_decl != NULL_TREE)
sourcefile = DECL_SOURCE_FILE (current_function_decl);
if (xloc.line > 0)
{
-#ifdef USE_MAPPED_LOCATION
if (xloc.column > 0)
sprintf (linecolbuf, "%d:%d", xloc.line, xloc.column);
else
-#endif
sprintf (linecolbuf, "%d", xloc.line);
colon = ":";
line = linecolbuf;
TREE_PUBLIC (decl) = 1;
DECL_EXTERNAL (decl) = 1;
lang_hooks.decls.pushdecl (decl);
+ /* The decl was declared by the compiler. */
+ DECL_ARTIFICIAL (decl) = 1;
+ /* And we don't want debug info for it. */
+ DECL_IGNORED_P (decl) = 1;
return decl;
}
/* Add the __mf_register call at the current appending point. */
if (tsi_end_p (initially_stmts))
- warning (0, "mudflap cannot track %qs in stub function",
- IDENTIFIER_POINTER (DECL_NAME (decl)));
+ {
+ if (!DECL_ARTIFICIAL (decl))
+ warning (0, "mudflap cannot track %qs in stub function",
+ IDENTIFIER_POINTER (DECL_NAME (decl)));
+ }
else
{
tsi_link_before (&initially_stmts, register_fncall,