[llvm] b7d8c61 - [TextAPI] Add missing include for Expected type
Cyndy Ishida via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 25 12:45:38 PDT 2024
Author: Cyndy Ishida
Date: 2024-03-25T15:45:25-04:00
New Revision: b7d8c6188986f62573b9516fe27fdd0c7df1aaf9
URL: https://github.com/llvm/llvm-project/commit/b7d8c6188986f62573b9516fe27fdd0c7df1aaf9
DIFF: https://github.com/llvm/llvm-project/commit/b7d8c6188986f62573b9516fe27fdd0c7df1aaf9.diff
LOG: [TextAPI] Add missing include for Expected type
Added:
Modified:
llvm/include/llvm/TextAPI/Utils.h
llvm/lib/TextAPI/Utils.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/TextAPI/Utils.h b/llvm/include/llvm/TextAPI/Utils.h
index 353859ca4cea6f..319e0abce25b03 100644
--- a/llvm/include/llvm/TextAPI/Utils.h
+++ b/llvm/include/llvm/TextAPI/Utils.h
@@ -14,6 +14,7 @@
#define LLVM_TEXTAPI_UTILS_H
#include "llvm/ADT/Twine.h"
+#include "llvm/Support/Error.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Regex.h"
diff --git a/llvm/lib/TextAPI/Utils.cpp b/llvm/lib/TextAPI/Utils.cpp
index 61f4df1d4a6beb..56b63ee01b390c 100644
--- a/llvm/lib/TextAPI/Utils.cpp
+++ b/llvm/lib/TextAPI/Utils.cpp
@@ -155,7 +155,7 @@ bool llvm::MachO::isPrivateLibrary(StringRef Path, bool IsSymLink) {
static StringLiteral RegexMetachars = "()^$|+.[]\\{}";
-Expected<Regex> llvm::MachO::createRegexFromGlob(StringRef Glob) {
+llvm::Expected<Regex> llvm::MachO::createRegexFromGlob(StringRef Glob) {
SmallString<128> RegexString("^");
unsigned NumWildcards = 0;
for (unsigned i = 0; i < Glob.size(); ++i) {
@@ -191,7 +191,7 @@ Expected<Regex> llvm::MachO::createRegexFromGlob(StringRef Glob) {
if (NumWildcards == 0)
return make_error<StringError>("not a glob", inconvertibleErrorCode());
- auto Rule = Regex(RegexString);
+ llvm::Regex Rule = Regex(RegexString);
std::string Error;
if (!Rule.isValid(Error))
return make_error<StringError>(Error, inconvertibleErrorCode());
More information about the llvm-commits
mailing list