summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/Path.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-05-05 18:30:58 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-05-05 18:30:58 +0000
commit86cb31862f1ce14c3e6774ec9d84e51e47a43587 (patch)
tree0f53e56ae15c3d8f8e169b55013f5c821e32a18d /llvm/lib/System/Path.cpp
parent9c0c60d0801847eead729ccab3791fb530faa224 (diff)
downloadbcm5719-llvm-86cb31862f1ce14c3e6774ec9d84e51e47a43587.tar.gz
bcm5719-llvm-86cb31862f1ce14c3e6774ec9d84e51e47a43587.zip
Fix more -Wshorten-64-to-32 warnings.
llvm-svn: 50659
Diffstat (limited to 'llvm/lib/System/Path.cpp')
-rw-r--r--llvm/lib/System/Path.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/System/Path.cpp b/llvm/lib/System/Path.cpp
index e8fd5f29634..086c9f0238c 100644
--- a/llvm/lib/System/Path.cpp
+++ b/llvm/lib/System/Path.cpp
@@ -124,7 +124,8 @@ Path::isDynamicLibrary() const {
if (canRead()) {
std::string Magic;
if (getMagicNumber(Magic, 64))
- switch (IdentifyFileType(Magic.c_str(), Magic.length())) {
+ switch (IdentifyFileType(Magic.c_str(),
+ static_cast<unsigned>(Magic.length()))) {
default: return false;
case Mach_O_FixedVirtualMemorySharedLib_FileType:
case Mach_O_DynamicallyLinkedSharedLib_FileType:
@@ -167,7 +168,7 @@ Path::isBitcodeFile() const {
bool Path::hasMagicNumber(const std::string &Magic) const {
std::string actualMagic;
- if (getMagicNumber(actualMagic, Magic.size()))
+ if (getMagicNumber(actualMagic, static_cast<unsigned>(Magic.size())))
return Magic == actualMagic;
return false;
}
@@ -204,7 +205,7 @@ static std::string getDirnameCharSep(const std::string& path, char Sep) {
// If the path is all slashes, return a single slash.
// Otherwise, remove all trailing slashes.
- signed pos = path.size() - 1;
+ signed pos = static_cast<signed>(path.size()) - 1;
while (pos >= 0 && path[pos] == Sep)
--pos;
OpenPOWER on IntegriCloud