r242562 - Remove redundant bouncing between StringRef and a pair of 'const char *'.
Richard Smith
richard-llvm at metafoo.co.uk
Fri Jul 17 12:51:04 PDT 2015
Author: rsmith
Date: Fri Jul 17 14:51:03 2015
New Revision: 242562
URL: http://llvm.org/viewvc/llvm-project?rev=242562&view=rev
Log:
Remove redundant bouncing between StringRef and a pair of 'const char *'.
Modified:
cfe/trunk/include/clang/Serialization/ASTReader.h
cfe/trunk/lib/Serialization/ASTReader.cpp
Modified: cfe/trunk/include/clang/Serialization/ASTReader.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Serialization/ASTReader.h?rev=242562&r1=242561&r2=242562&view=diff
==============================================================================
--- cfe/trunk/include/clang/Serialization/ASTReader.h (original)
+++ cfe/trunk/include/clang/Serialization/ASTReader.h Fri Jul 17 14:51:03 2015
@@ -1755,10 +1755,7 @@ public:
/// declarations with this name are visible from translation unit scope, their
/// declarations will be deserialized and introduced into the declaration
/// chain of the identifier.
- virtual IdentifierInfo *get(const char *NameStart, const char *NameEnd);
- IdentifierInfo *get(StringRef Name) override {
- return get(Name.begin(), Name.end());
- }
+ IdentifierInfo *get(StringRef Name) override;
/// \brief Retrieve an iterator into the set of all identifiers
/// in all loaded AST files.
Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=242562&r1=242561&r2=242562&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReader.cpp Fri Jul 17 14:51:03 2015
@@ -6824,10 +6824,9 @@ void ASTReader::UpdateSema() {
SemaObj->ActOnPragmaOptimize(/* IsOn = */ false, OptimizeOffPragmaLocation);
}
-IdentifierInfo* ASTReader::get(const char *NameStart, const char *NameEnd) {
+IdentifierInfo *ASTReader::get(StringRef Name) {
// Note that we are loading an identifier.
Deserializing AnIdentifier(this);
- StringRef Name(NameStart, NameEnd - NameStart);
// If there is a global index, look there first to determine which modules
// provably do not have any results for this identifier.
More information about the cfe-commits
mailing list