[llvm] r276382 - Fix r276380 for targets without REALPATH.

Pete Cooper via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 21 18:52:58 PDT 2016


Author: pete
Date: Thu Jul 21 20:52:58 2016
New Revision: 276382

URL: http://llvm.org/viewvc/llvm-project?rev=276382&view=rev
Log:
Fix r276380 for targets without REALPATH.

This was a mistake in the layout of the code from r276380.  I moved the appropriate lines out of the #ifdef to fix it.

Modified:
    llvm/trunk/tools/dsymutil/DwarfLinker.cpp

Modified: llvm/trunk/tools/dsymutil/DwarfLinker.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/dsymutil/DwarfLinker.cpp?rev=276382&r1=276381&r2=276382&view=diff
==============================================================================
--- llvm/trunk/tools/dsymutil/DwarfLinker.cpp (original)
+++ llvm/trunk/tools/dsymutil/DwarfLinker.cpp Thu Jul 21 20:52:58 2016
@@ -1641,7 +1641,6 @@ PointerIntPair<DeclContext *, 1> DeclCon
             if (!ResolvedPath.empty()) {
               FileRef = ResolvedPath;
             } else {
-#ifdef HAVE_REALPATH
               std::string File;
               bool gotFileName =
                 LT->getFileNameByIndex(FileNum, "",
@@ -1649,6 +1648,7 @@ PointerIntPair<DeclContext *, 1> DeclCon
                         File);
               (void)gotFileName;
               assert(gotFileName && "Must get file name from line table");
+#ifdef HAVE_REALPATH
               char RealPath[PATH_MAX + 1];
               RealPath[PATH_MAX] = 0;
               if (::realpath(File.c_str(), RealPath))




More information about the llvm-commits mailing list