================
@@ -15,13 +15,29 @@
#include "lldb/Target/Target.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/Log.h"
-#include "lldb/Utility/StringLexer.h"
#include "clang/Basic/TargetInfo.h"
#include <optional>
#include <vector>
+static char popChar(llvm::StringRef &str) {
+ const char c = str.front();
+
+ str = str.drop_front();
+
+ return c;
+}
+
+static bool consumeChar(llvm::StringRef &str, char c) {
----------------
Michael137 wrote:
It doesn't work for `char` unfortunately. You have to pass it a string literal.
We can't get away with the string literal because we need to consume a `char`
lvalue. We could add a `llvm::StringRef::consume_front` should have a `char`
overload, but until then I'm pretty sure we need this helper
https://github.com/llvm/llvm-project/pull/172466
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits