[Lldb-commits] [lldb] [lldb] Add `nullptr` literal to DIL (PR #208831)

Sergei Barannikov via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 15 05:13:20 PDT 2026


================
@@ -459,6 +459,21 @@ Interpreter::Visit(const IdentifierNode &node) {
   if (!identifier)
     identifier = LookupEnumValue(node.GetName(), m_stack_frame);
 
+  if (!identifier && node.GetName() == "nullptr") {
+    // If we got a "nullptr" identifier, and there is no defined variable with
+    // this name, resolve it as a null pointer.
+    llvm::Expected<lldb::TypeSystemSP> type_system =
+        GetTypeSystemFromCU(m_stack_frame);
+    if (!type_system)
+      return type_system.takeError();
+    type_system.get()->GetPointerByteSize();
----------------
s-barannikov wrote:

```suggestion
```

https://github.com/llvm/llvm-project/pull/208831


More information about the lldb-commits mailing list