Skip to content

Commit

Permalink
Fix r276380 for targets without REALPATH.
Browse files Browse the repository at this point in the history
This was a mistake in the layout of the code from r276380.  I moved the appropriate lines out of the #ifdef to fix it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276382 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
cooperp committed Jul 22, 2016
1 parent 59023bf commit 632eb53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/dsymutil/DwarfLinker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1641,14 +1641,14 @@ PointerIntPair<DeclContext *, 1> DeclContextTree::getChildDeclContext(
if (!ResolvedPath.empty()) {
FileRef = ResolvedPath;
} else {
#ifdef HAVE_REALPATH
std::string File;
bool gotFileName =
LT->getFileNameByIndex(FileNum, "",
DILineInfoSpecifier::FileLineInfoKind::AbsoluteFilePath,
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))
Expand Down

0 comments on commit 632eb53

Please sign in to comment.