r283888 - Use StringRef instead of raw pointer in SourceManagerInternals LineTableInfo API (NFC)

Mehdi Amini via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 11 08:15:32 PDT 2016


Author: mehdi_amini
Date: Tue Oct 11 10:15:32 2016
New Revision: 283888

URL: http://llvm.org/viewvc/llvm-project?rev=283888&view=rev
Log:
Use StringRef instead of raw pointer in SourceManagerInternals LineTableInfo API (NFC)

Modified:
    cfe/trunk/include/clang/Basic/SourceManagerInternals.h

Modified: cfe/trunk/include/clang/Basic/SourceManagerInternals.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceManagerInternals.h?rev=283888&r1=283887&r2=283888&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/SourceManagerInternals.h (original)
+++ cfe/trunk/include/clang/Basic/SourceManagerInternals.h Tue Oct 11 10:15:32 2016
@@ -95,9 +95,9 @@ public:
   }
 
   unsigned getLineTableFilenameID(StringRef Str);
-  const char *getFilename(unsigned ID) const {
+  StringRef getFilename(unsigned ID) const {
     assert(ID < FilenamesByID.size() && "Invalid FilenameID");
-    return FilenamesByID[ID]->getKeyData();
+    return FilenamesByID[ID]->getKey();
   }
   unsigned getNumFilenames() const { return FilenamesByID.size(); }
 




More information about the cfe-commits mailing list