[Lldb-commits] [lldb] r156514 - /lldb/trunk/source/Expression/ExpressionSourceCode.cpp
Sean Callanan
scallanan at apple.com
Wed May 9 14:27:03 PDT 2012
Author: spyffe
Date: Wed May 9 16:27:03 2012
New Revision: 156514
URL: http://llvm.org/viewvc/llvm-project?rev=156514&view=rev
Log:
Added a #define of NULL to 0 to make NULL usable
in expressions.
Modified:
lldb/trunk/source/Expression/ExpressionSourceCode.cpp
Modified: lldb/trunk/source/Expression/ExpressionSourceCode.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ExpressionSourceCode.cpp?rev=156514&r1=156513&r2=156514&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ExpressionSourceCode.cpp (original)
+++ lldb/trunk/source/Expression/ExpressionSourceCode.cpp Wed May 9 16:27:03 2012
@@ -35,6 +35,8 @@
break;
case lldb::eLanguageTypeC:
wrap_stream.Printf("%s \n"
+ "#undef NULL \n"
+ "#define NULL 0 \n"
"typedef unsigned short unichar;\n"
"void \n"
"%s(void *$__lldb_arg) \n"
@@ -47,6 +49,8 @@
break;
case lldb::eLanguageTypeC_plus_plus:
wrap_stream.Printf("%s \n"
+ "#undef NULL \n"
+ "#define NULL 0 \n"
"typedef unsigned short unichar; \n"
"void \n"
"$__lldb_class::%s(void *$__lldb_arg) %s\n"
@@ -62,6 +66,8 @@
if (static_method)
{
wrap_stream.Printf("%s \n"
+ "#undef NULL \n"
+ "#define NULL 0 \n"
"typedef unsigned short unichar; \n"
"@interface $__lldb_objc_class ($__lldb_category) \n"
"+(void)%s:(void *)$__lldb_arg; \n"
@@ -79,7 +85,9 @@
}
else
{
- wrap_stream.Printf("%s \n"
+ wrap_stream.Printf("%s \n"
+ "#undef NULL \n"
+ "#define NULL 0 \n"
"typedef unsigned short unichar; \n"
"@interface $__lldb_objc_class ($__lldb_category) \n"
"-(void)%s:(void *)$__lldb_arg; \n"
More information about the lldb-commits
mailing list