Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
356b0698
Commit
356b0698
authored
Oct 24, 2001
by
Richard Kenner
Committed by
Richard Kenner
Oct 24, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* dwarf2out.c (file_info_cmp): Always return consistent results.
From-SVN: r46480
parent
e23381df
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
14 deletions
+18
-14
gcc/ChangeLog
+4
-0
gcc/dwarf2out.c
+14
-14
No files found.
gcc/ChangeLog
View file @
356b0698
Wed
Oct
24
18
:
43
:
42
2001
Richard
Kenner
<
kenner
@vlsi1
.
ultra
.
nyu
.
edu
>
*
dwarf2out
.
c
(
file_info_cmp
)
:
Always
return
consistent
results
.
2001
-
10
-
24
Roger
Sayle
<
roger
@eyesopen
.
com
>
*
stmt
.
c
(
expand_end_case
)
:
Index
jumptables
from
zero
for
...
...
gcc/dwarf2out.c
View file @
356b0698
...
...
@@ -6573,6 +6573,7 @@ struct dir_info
/* Callback function for file_info comparison. We sort by looking at
the directories in the path. */
static
int
file_info_cmp
(
p1
,
p2
)
const
void
*
p1
;
...
...
@@ -6583,11 +6584,13 @@ file_info_cmp (p1, p2)
unsigned
char
*
cp1
;
unsigned
char
*
cp2
;
/* Take care of file names without directories. */
if
(
s1
->
path
==
s1
->
fname
)
return
-
1
;
else
if
(
s2
->
path
==
s2
->
fname
)
return
1
;
/* Take care of file names without directories. We need to make sure that
we return consistent values to qsort since some will get confused if
we return the same value when identical operands are passed in opposite
orders. So if neither has a directory, return 0 and otherwise return
1 or -1 depending on which one has the directory. */
if
((
s1
->
path
==
s1
->
fname
||
s2
->
path
==
s2
->
fname
))
return
(
s2
->
path
==
s2
->
fname
)
-
(
s1
->
path
==
s1
->
fname
);
cp1
=
(
unsigned
char
*
)
s1
->
path
;
cp2
=
(
unsigned
char
*
)
s2
->
path
;
...
...
@@ -6596,17 +6599,14 @@ file_info_cmp (p1, p2)
{
++
cp1
;
++
cp2
;
/* Reached the end of the first path? */
if
(
cp1
==
(
unsigned
char
*
)
s1
->
fname
)
/* It doesn't really matter in which order files from the
same directory are sorted in. Therefore don't test for
the second path reaching the end. */
return
-
1
;
else
if
(
cp2
==
(
unsigned
char
*
)
s2
->
fname
)
return
1
;
/* Reached the end of the first path? If so, handle like above. */
if
((
cp1
==
(
unsigned
char
*
)
s1
->
fname
)
||
(
cp2
==
(
unsigned
char
*
)
s2
->
fname
))
return
((
cp2
==
(
unsigned
char
*
)
s2
->
fname
)
-
(
cp1
==
(
unsigned
char
*
)
s1
->
fname
));
/* Character of current path component the same? */
if
(
*
cp1
!=
*
cp2
)
else
if
(
*
cp1
!=
*
cp2
)
return
*
cp1
-
*
cp2
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment