diff options
author | Sean Callanan <scallanan@apple.com> | 2012-05-09 21:27:03 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2012-05-09 21:27:03 +0000 |
commit | 26e184d4e4d4b5fca2667ec4ed444013b770de2c (patch) | |
tree | 375ea0756add1337ecdc470e52ce60efe3b63586 /lldb/source/Expression/ExpressionSourceCode.cpp | |
parent | 729e6a056c1e15e7904ebb699eb95a4d9dfd1f9f (diff) | |
download | llvm-26e184d4e4d4b5fca2667ec4ed444013b770de2c.zip llvm-26e184d4e4d4b5fca2667ec4ed444013b770de2c.tar.gz llvm-26e184d4e4d4b5fca2667ec4ed444013b770de2c.tar.bz2 |
Added a #define of NULL to 0 to make NULL usable
in expressions.
llvm-svn: 156514
Diffstat (limited to 'lldb/source/Expression/ExpressionSourceCode.cpp')
-rw-r--r-- | lldb/source/Expression/ExpressionSourceCode.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lldb/source/Expression/ExpressionSourceCode.cpp b/lldb/source/Expression/ExpressionSourceCode.cpp index b1719b3..1d1c2f1 100644 --- a/lldb/source/Expression/ExpressionSourceCode.cpp +++ b/lldb/source/Expression/ExpressionSourceCode.cpp @@ -35,6 +35,8 @@ bool ExpressionSourceCode::GetText (std::string &text, lldb::LanguageType wrappi 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 @@ bool ExpressionSourceCode::GetText (std::string &text, lldb::LanguageType wrappi 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 @@ bool ExpressionSourceCode::GetText (std::string &text, lldb::LanguageType wrappi 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 @@ bool ExpressionSourceCode::GetText (std::string &text, lldb::LanguageType wrappi } 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" |