summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2016-07-22 01:52:58 +0000
committerPete Cooper <peter_cooper@apple.com>2016-07-22 01:52:58 +0000
commitcadadaa1b3613f4be2465a45cd530c036c5bcd80 (patch)
tree97e578c8b3589c29e30f6124115113fb1fe4e02d /llvm/tools
parent43efcced31ea41c46db9a4f1840546ed76c9c7af (diff)
downloadbcm5719-llvm-cadadaa1b3613f4be2465a45cd530c036c5bcd80.tar.gz
bcm5719-llvm-cadadaa1b3613f4be2465a45cd530c036c5bcd80.zip
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
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/dsymutil/DwarfLinker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/dsymutil/DwarfLinker.cpp b/llvm/tools/dsymutil/DwarfLinker.cpp
index 0421040b3d6..67bf82bfe97 100644
--- a/llvm/tools/dsymutil/DwarfLinker.cpp
+++ b/llvm/tools/dsymutil/DwarfLinker.cpp
@@ -1641,7 +1641,6 @@ PointerIntPair<DeclContext *, 1> DeclContextTree::getChildDeclContext(
if (!ResolvedPath.empty()) {
FileRef = ResolvedPath;
} else {
-#ifdef HAVE_REALPATH
std::string File;
bool gotFileName =
LT->getFileNameByIndex(FileNum, "",
@@ -1649,6 +1648,7 @@ PointerIntPair<DeclContext *, 1> DeclContextTree::getChildDeclContext(
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))
OpenPOWER on IntegriCloud