mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-16 08:08:01 +00:00
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
This commit is contained in:
parent
f005037967
commit
9bb00a910b
@ -1641,7 +1641,6 @@ PointerIntPair<DeclContext *, 1> DeclContextTree::getChildDeclContext(
|
|||||||
if (!ResolvedPath.empty()) {
|
if (!ResolvedPath.empty()) {
|
||||||
FileRef = ResolvedPath;
|
FileRef = ResolvedPath;
|
||||||
} else {
|
} else {
|
||||||
#ifdef HAVE_REALPATH
|
|
||||||
std::string File;
|
std::string File;
|
||||||
bool gotFileName =
|
bool gotFileName =
|
||||||
LT->getFileNameByIndex(FileNum, "",
|
LT->getFileNameByIndex(FileNum, "",
|
||||||
@ -1649,6 +1648,7 @@ PointerIntPair<DeclContext *, 1> DeclContextTree::getChildDeclContext(
|
|||||||
File);
|
File);
|
||||||
(void)gotFileName;
|
(void)gotFileName;
|
||||||
assert(gotFileName && "Must get file name from line table");
|
assert(gotFileName && "Must get file name from line table");
|
||||||
|
#ifdef HAVE_REALPATH
|
||||||
char RealPath[PATH_MAX + 1];
|
char RealPath[PATH_MAX + 1];
|
||||||
RealPath[PATH_MAX] = 0;
|
RealPath[PATH_MAX] = 0;
|
||||||
if (::realpath(File.c_str(), RealPath))
|
if (::realpath(File.c_str(), RealPath))
|
||||||
|
Loading…
Reference in New Issue
Block a user