summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-10-10 22:52:47 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-10-10 22:52:47 +0000
commit8bd553fc8d3074d54421845a80ea5ccc3a4c44a9 (patch)
tree997d123ec176455f52c46a2bd3b8b0789173a7ff /tools
parent24a15d69fc8bff2dd1c53bd4ecf59b5b931326d2 (diff)
Store FileEntry::Filename as a StringRef instead of raw pointer (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283815 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/libclang/CXSourceLocation.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/libclang/CXSourceLocation.cpp b/tools/libclang/CXSourceLocation.cpp
index 1b7464b25a..e75f6a757f 100644
--- a/tools/libclang/CXSourceLocation.cpp
+++ b/tools/libclang/CXSourceLocation.cpp
@@ -139,16 +139,17 @@ CXSourceLocation clang_getLocation(CXTranslationUnit TU,
if (SLoc.isInvalid()) {
if (Log)
*Log << llvm::format("(\"%s\", %d, %d) = invalid",
- File->getName(), line, column);
+ File->getName().str().c_str(), line, column);
return clang_getNullLocation();
}
CXSourceLocation CXLoc =
cxloc::translateSourceLocation(CXXUnit->getASTContext(), SLoc);
if (Log)
- *Log << llvm::format("(\"%s\", %d, %d) = ", File->getName(), line, column)
+ *Log << llvm::format("(\"%s\", %d, %d) = ", File->getName().str().c_str(),
+ line, column)
<< CXLoc;
-
+
return CXLoc;
}