Simplify a few uses of remove_filename by using parent_path instead.
[oota-llvm.git] / tools / lli / lli.cpp
index 057841f0ad604d4389aa73ae1822ad0dea361bed..949b444cc28169dde13962e91eafa34ac58b8c59 100644 (file)
@@ -262,8 +262,7 @@ public:
     if (!getCacheFilename(ModuleID, CacheName))
       return;
     if (!CacheDir.empty()) { // Create user-defined cache dir.
-      SmallString<128> dir(CacheName);
-      sys::path::remove_filename(dir);
+      SmallString<128> dir(sys::path::parent_path(CacheName));
       sys::fs::create_directories(Twine(dir));
     }
     std::error_code EC;