From 0c5aabc2c7f1612f9c5b51a1744eb3b9b3d0a740 Mon Sep 17 00:00:00 2001 From: Sean Callanan Date: Thu, 31 May 2012 17:49:31 +0000 Subject: [PATCH] Made nil resolve as (id)0 and not be looked up (which regularly conflicts with existing symbols in Objective-C). llvm-svn: 157758 --- lldb/source/Expression/ExpressionSourceCode.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lldb/source/Expression/ExpressionSourceCode.cpp b/lldb/source/Expression/ExpressionSourceCode.cpp index 1d1c2f1a6ab1..7004d28fa4c4 100644 --- a/lldb/source/Expression/ExpressionSourceCode.cpp +++ b/lldb/source/Expression/ExpressionSourceCode.cpp @@ -37,6 +37,8 @@ bool ExpressionSourceCode::GetText (std::string &text, lldb::LanguageType wrappi 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 @@ bool ExpressionSourceCode::GetText (std::string &text, lldb::LanguageType wrappi 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 @@ bool ExpressionSourceCode::GetText (std::string &text, lldb::LanguageType wrappi 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 @@ bool ExpressionSourceCode::GetText (std::string &text, lldb::LanguageType wrappi 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"