Remove redundant bouncing between StringRef and a pair of 'const char *'.

llvm-svn: 242562
This commit is contained in:
Richard Smith 2015-07-17 19:51:03 +00:00
parent 7f54753180
commit a8d5b6ad45
2 changed files with 2 additions and 6 deletions

View File

@ -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.

View File

@ -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.