[cfe-commits] r89229 - /cfe/trunk/lib/Frontend/PCHReader.cpp

Daniel Dunbar daniel at zuster.org
Wed Nov 18 11:50:42 PST 2009


Author: ddunbar
Date: Wed Nov 18 13:50:41 2009
New Revision: 89229

URL: http://llvm.org/viewvc/llvm-project?rev=89229&view=rev
Log:
Use llvm::sys::Path to check isAbsolute, instead of hard coding. Also, remove random FIXME (?).

Modified:
    cfe/trunk/lib/Frontend/PCHReader.cpp

Modified: cfe/trunk/lib/Frontend/PCHReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHReader.cpp?rev=89229&r1=89228&r2=89229&view=diff

==============================================================================
--- cfe/trunk/lib/Frontend/PCHReader.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHReader.cpp Wed Nov 18 13:50:41 2009
@@ -34,6 +34,7 @@
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/ErrorHandling.h"
+#include "llvm/System/Path.h"
 #include <algorithm>
 #include <iterator>
 #include <cstdio>
@@ -1086,11 +1087,9 @@
   if (!RelocatablePCH)
     return;
 
-  if (Filename.empty() || Filename[0] == '/' || Filename[0] == '<')
+  if (Filename.empty() || llvm::sys::Path(Filename).isAbsolute())
     return;
 
-  std::string FIXME = Filename;
-
   if (isysroot == 0) {
     // If no system root was given, default to '/'
     Filename.insert(Filename.begin(), '/');





More information about the cfe-commits mailing list