Commit 143b6bc3 by David Edelsohn Committed by David Edelsohn

xcoffout.c (xcoffout_declare_function): Always strip storage class encoding.

        * xcoffout.c (xcoffout_declare_function): Always strip storage
        class encoding.

From-SVN: r92101
parent 9940eedb
2004-12-13 David Edelsohn <edelsohn@gnu.org>
* xcoffout.c (xcoffout_declare_function): Always strip storage
class encoding.
2004-12-13 Andrew Pinski <pinskia@physics.uc.edu> 2004-12-13 Andrew Pinski <pinskia@physics.uc.edu>
PR target/18964 PR target/18964
......
...@@ -405,22 +405,18 @@ xcoffout_end_block (unsigned int line, unsigned int n) ...@@ -405,22 +405,18 @@ xcoffout_end_block (unsigned int line, unsigned int n)
void void
xcoffout_declare_function (FILE *file, tree decl, const char *name) xcoffout_declare_function (FILE *file, tree decl, const char *name)
{ {
int i; size_t len;
if (*name == '*') if (*name == '*')
name++; name++;
else len = strlen (name);
for (i = 0; name[i]; ++i) if (name[len - 1] == ']')
{ {
if (name[i] == '[') char *n = alloca (len - 3);
{ strncpy (n, name, len - 4);
char *n = alloca (i + 1); n[len - 4] = '\0';
strncpy (n, name, i); name = n;
n[i] = '\0'; }
name = n;
break;
}
}
/* Any pending .bi or .ei must occur before the .function pseudo op. /* Any pending .bi or .ei must occur before the .function pseudo op.
Otherwise debuggers will think that the function is in the previous Otherwise debuggers will think that the function is in the previous
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment