Made nil resolve as (id)0 and not be looked up
(which regularly conflicts with existing symbols
in Objective-C).


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157758 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/ExpressionSourceCode.cpp b/source/Expression/ExpressionSourceCode.cpp
index 1d1c2f1..7004d28 100644
--- a/source/Expression/ExpressionSourceCode.cpp
+++ b/source/Expression/ExpressionSourceCode.cpp
@@ -37,6 +37,8 @@
             wrap_stream.Printf("%s                             \n"
                                "#undef NULL                    \n"
                                "#define NULL 0                 \n"
+                               "#undef nil                     \n"
+                               "#define nil (id)0              \n"
                                "typedef unsigned short unichar;\n"
                                "void                           \n"
                                "%s(void *$__lldb_arg)          \n"
@@ -51,6 +53,8 @@
             wrap_stream.Printf("%s                                     \n"
                                "#undef NULL                            \n"
                                "#define NULL 0                         \n"
+                               "#undef nil                             \n"
+                               "#define nil (id)0                      \n"
                                "typedef unsigned short unichar;        \n"
                                "void                                   \n"
                                "$__lldb_class::%s(void *$__lldb_arg) %s\n"
@@ -68,6 +72,8 @@
                 wrap_stream.Printf("%s                                                      \n"
                                     "#undef NULL                                            \n"
                                     "#define NULL 0                                         \n"
+                                    "#undef nil                                             \n"
+                                    "#define nil (id)0                                      \n"
                                     "typedef unsigned short unichar;                        \n"
                                     "@interface $__lldb_objc_class ($__lldb_category)       \n"
                                     "+(void)%s:(void *)$__lldb_arg;                         \n"
@@ -88,6 +94,8 @@
                 wrap_stream.Printf("%s                                                     \n"
                                    "#undef NULL                                            \n"
                                    "#define NULL 0                                         \n"
+                                   "#undef nil                                             \n"
+                                   "#define nil (id)0                                      \n"
                                    "typedef unsigned short unichar;                        \n"
                                    "@interface $__lldb_objc_class ($__lldb_category)       \n"
                                    "-(void)%s:(void *)$__lldb_arg;                         \n"