Files
clang-p2996/lldb/test/expression_command/two-files/main.c
Johnny Chen 86f4f315ca Add TestObjCTypeQueryFromOtherCompileUnit.py to test that when stopped in the 'main.c'
compile unit, which has an external reference to symbols defined in foo.m, the type query:

    in this case, 'expression (NSArray*)array_token'

continues to work.

This test is to accompany http://llvm.org/viewvc/llvm-project?rev=131145&view=rev.

llvm-svn: 131154
2011-05-10 21:36:11 +00:00

20 lines
370 B
C

#include <stdio.h>
extern int AddElement (char *value);
extern char *GetElement (int idx);
extern void *GetArray();
int
main ()
{
int idx = AddElement ("some string");
void *array_token = GetArray();
char *string = GetElement (0); // Set breakpoint here, then do 'expr (NSArray*)array_token'.
if (string)
printf ("This: %s.\n", string);
return 0;
}