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.
llvm-svn: 276382
diff --git a/llvm/tools/dsymutil/DwarfLinker.cpp b/llvm/tools/dsymutil/DwarfLinker.cpp
index 0421040..67bf82b 100644
--- a/llvm/tools/dsymutil/DwarfLinker.cpp
+++ b/llvm/tools/dsymutil/DwarfLinker.cpp
@@ -1641,7 +1641,6 @@
if (!ResolvedPath.empty()) {
FileRef = ResolvedPath;
} else {
-#ifdef HAVE_REALPATH
std::string File;
bool gotFileName =
LT->getFileNameByIndex(FileNum, "",
@@ -1649,6 +1648,7 @@
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))