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(); } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits