mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Use StringRef in more places to match recent llvm changes.
llvm r283043 and possibly other recent changes switch to use StringRef instead of char* pointers. Update Swift to match. In some cases, this is a clear improvement. It would be good to assess the impact on memory use, particularly for the Filename component of source locations. Note that the change to SILLocation::isNull fixes an apparent bug where the location was treated as null when the filename was *not* null.
This commit is contained in:
@@ -3598,8 +3598,8 @@ class DeclGroupNameContext {
|
||||
auto PathOp = VD->getDeclContext()->getParentSourceFile()->getBufferID();
|
||||
if (!PathOp.hasValue())
|
||||
return NullGroupName;
|
||||
StringRef FullPath = StringRef(VD->getASTContext().SourceMgr.
|
||||
getIdentifierForBuffer(PathOp.getValue()));
|
||||
StringRef FullPath =
|
||||
VD->getASTContext().SourceMgr.getIdentifierForBuffer(PathOp.getValue());
|
||||
if (!pMap) {
|
||||
YamlGroupInputParser Parser(RecordPath);
|
||||
if (!Parser.parse()) {
|
||||
|
||||
Reference in New Issue
Block a user