[ELF] - Use std::regex instead of hand written logic in elf::globMatch()

Use std::regex instead of hand written matcher.

Patch based on code and ideas of Rui Ueyama.

Differential revision: https://reviews.llvm.org/D23829

llvm-svn: 280544
diff --git a/lld/ELF/Strings.h b/lld/ELF/Strings.h
index 4948e9d..ad99eb9 100644
--- a/lld/ELF/Strings.h
+++ b/lld/ELF/Strings.h
@@ -11,11 +11,13 @@
 #define LLD_COFF_STRINGS_H
 
 #include "lld/Core/LLVM.h"
+#include "llvm/Support/Regex.h"
 #include <vector>
 
 namespace lld {
 namespace elf {
-bool globMatch(StringRef S, StringRef T);
+llvm::Regex compileGlobPatterns(ArrayRef<StringRef> V);
+bool hasWildcard(StringRef S);
 std::vector<uint8_t> parseHex(StringRef S);
 bool isValidCIdentifier(StringRef S);