summaryrefslogtreecommitdiffstats
path: root/llvm/tools/gccld/GenerateCode.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2005-07-07 23:21:43 +0000
committerReid Spencer <rspencer@reidspencer.com>2005-07-07 23:21:43 +0000
commitc9c0473fa5cc6490859410b3bb055d4f6e7cbc00 (patch)
treebe5711878cf0da37f08d6cd1934155e833e016ac /llvm/tools/gccld/GenerateCode.cpp
parent4ed40f7c6f13bcb1ef0487392413c6d78dd6790d (diff)
downloadbcm5719-llvm-c9c0473fa5cc6490859410b3bb055d4f6e7cbc00.tar.gz
bcm5719-llvm-c9c0473fa5cc6490859410b3bb055d4f6e7cbc00.zip
For PR495:
Get rid of the difference between file paths and directory paths. The Path class now simply stores a path that can refer to either a file or a directory. This required various changes in the implementation and interface of the class with the corresponding impact to its users. Doxygen comments were also updated to reflect these changes. Interface changes are: appendDirectory -> appendComponent appendFile -> appendComponent elideDirectory -> eraseComponent elideFile -> eraseComponent elideSuffix -> eraseSuffix renameFile -> rename setDirectory -> set setFile -> set Changes pass Dejagnu and llvm-test/SingleSource tests. llvm-svn: 22349
Diffstat (limited to 'llvm/tools/gccld/GenerateCode.cpp')
-rw-r--r--llvm/tools/gccld/GenerateCode.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/llvm/tools/gccld/GenerateCode.cpp b/llvm/tools/gccld/GenerateCode.cpp
index 020d883a6bc..f6a08ce8cb0 100644
--- a/llvm/tools/gccld/GenerateCode.cpp
+++ b/llvm/tools/gccld/GenerateCode.cpp
@@ -152,15 +152,11 @@ static bool isBytecodeLibrary(const sys::Path &FullPath) {
static bool isBytecodeLPath(const std::string &LibPath) {
bool isBytecodeLPath = false;
- // Make sure the -L path has a '/' character
- // because llvm-g++ passes them without the ending
- // '/' char and sys::Path doesn't think it is a
- // directory (see: sys::Path::isDirectory) without it
- std::string dir = LibPath;
- if ( dir[dir.length()-1] != '/' )
- dir.append("/");
-
- sys::Path LPath(dir);
+ sys::Path LPath(LibPath);
+
+ // Make sure its a directory
+ if (!LPath.isDirectory())
+ return isBytecodeLPath;
// Grab the contents of the -L path
std::set<sys::Path> Files;
OpenPOWER on IntegriCloud