Matej =?utf-8?q?Košík?= <[email protected]>,
Matej =?utf-8?q?Košík?= <[email protected]>,
Matej =?utf-8?q?Košík?= <[email protected]>,
Matej =?utf-8?q?Košík?= <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>


================
@@ -5508,6 +5508,22 @@ 
TypeSystemClang::GetNumChildren(lldb::opaque_compiler_type_t type,
 }
 
 CompilerType TypeSystemClang::GetBuiltinTypeByName(ConstString name) {
+  StringRef name_ref = name.GetStringRef();
+  // We compile the regex only the type name fulfills certain
+  // necessary conditions. Otherwise we do not bother.
+  if ((!name_ref.empty() && name_ref[0] == '_') ||
+      (name_ref.size() >= 10 && name_ref[9] == '_')) {
----------------
Michael137 wrote:

Can we just do the following?
```
if (name_ref.consume_front("unsigned _BitInt") || 
name_ref.consume_front("_BitInt")) {
  const bool is_unsigned = name.GetStringRef().starts_with("unsigned");
  ...
}
```

https://github.com/llvm/llvm-project/pull/165857
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to