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
cd2705aa
Commit
cd2705aa
authored
Jan 17, 2012
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compiler: Don't use import path for ./ or ../ imports.
From-SVN: r183261
parent
ee3d2ecd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
gcc/go/gofrontend/import.cc
+14
-3
No files found.
gcc/go/gofrontend/import.cc
View file @
cd2705aa
...
...
@@ -42,8 +42,8 @@ const char* const Import::import_marker = "*imported*";
// returns a pointer to a Stream object to read the data that it
// exports. If the file is not found, it returns NULL.
// When FILENAME is not an absolute path
, we use the search path
// provided by -I and -L options.
// When FILENAME is not an absolute path
and does not start with ./ or
//
../, we use the search path
provided by -I and -L options.
// When FILENAME does not exist, we try modifying FILENAME to find the
// file. We use the first of these which exists:
...
...
@@ -61,7 +61,18 @@ const char* const Import::import_marker = "*imported*";
Import
::
Stream
*
Import
::
open_package
(
const
std
::
string
&
filename
,
Location
location
)
{
if
(
!
IS_ABSOLUTE_PATH
(
filename
))
bool
is_local
;
if
(
IS_ABSOLUTE_PATH
(
filename
))
is_local
=
true
;
else
if
(
filename
[
0
]
==
'.'
&&
IS_DIR_SEPARATOR
(
filename
[
1
]))
is_local
=
true
;
else
if
(
filename
[
0
]
==
'.'
&&
filename
[
1
]
==
'.'
&&
IS_DIR_SEPARATOR
(
filename
[
2
]))
is_local
=
true
;
else
is_local
=
false
;
if
(
!
is_local
)
{
for
(
std
::
vector
<
std
::
string
>::
const_iterator
p
=
search_path
.
begin
();
p
!=
search_path
.
end
();
...
...
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