This is an archive of the discontinued LLVM Phabricator instance.

Add [<chars>] to the glob matcher to eliminate use of llvm::Regex.
ClosedPublic

Authored by ruiu on Nov 3 2016, 10:13 AM.

Details

Summary

Previously, it didn't support the character class, so we couldn't
eliminate the use fo llvm::Regex. Now that it is supported, we
can remove compileGlobPattern, which converts a glob pattern to
a regex.

This patch contains optimization for exact/prefix/suffix matches.

Event Timeline

ruiu updated this revision to Diff 76870.Nov 3 2016, 10:13 AM
ruiu retitled this revision from to Add [<chars>] to the glob matcher to eliminate use of llvm::Regex..
ruiu updated this object.
ruiu added a reviewer: evgeny777.
ruiu added a subscriber: llvm-commits.
evgeny777 accepted this revision.Nov 3 2016, 10:36 AM
evgeny777 edited edge metadata.

LGTM with nits

ELF/LinkerScript.cpp
1250

std::move should be removed here or used on line 1214 as well

ELF/LinkerScript.h
117

I would use "StringMatcher &&" to avoid copying of member vector

ELF/Strings.cpp
148

I would pass Pat by const reference to avoid copying.

This revision is now accepted and ready to land.Nov 3 2016, 10:36 AM
This revision was automatically updated to reflect the committed changes.