diff options
author | Mehdi Amini <mehdi.amini@apple.com> | 2016-10-10 22:52:47 +0000 |
---|---|---|
committer | Mehdi Amini <mehdi.amini@apple.com> | 2016-10-10 22:52:47 +0000 |
commit | 8bd553fc8d3074d54421845a80ea5ccc3a4c44a9 (patch) | |
tree | 997d123ec176455f52c46a2bd3b8b0789173a7ff /tools | |
parent | 24a15d69fc8bff2dd1c53bd4ecf59b5b931326d2 (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.cpp | 7 |
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; } |