lldb/test/expression_command/persist_objc_pointeetype/main.m depends on CloudKit.h

Should the dependency be removed or require CloudKit to run the tests?

Is there a specific issue with the CloudKit framework?

Thanks,
- Enrico
:envelope_with_arrow: egranata@.com :phone: 27683

I’ve done a little investigating on this.

On my MacPro (Xcode 6.2), the inferior binary fails to build because it can’t find a header file.

os command: make MAKE_DSYM=NO ARCH=x86_64 CC=“clang”
with pid: 14574
stdout: clang -g -O0 -arch x86_64 -I/Users/vharron/ll/tot/lldb/test/make/…/…/include -include /Users/vharron/ll/tot/lldb/test/make/test_common.h -c -o main.o main.m

stderr: main.m:6:9: fatal error: ‘CloudKit/CloudKit.h’ file not found
#import <CloudKit/CloudKit.h>
^
1 error generated.
main.m:6:9: fatal error: ‘CloudKit/CloudKit.h’ file not found
#import <CloudKit/CloudKit.h>
^
1 error generated.
make: *** [main.o] Error 1

vharron-macpro3:test vharron$ find / -name CloudKit.framework 2>/dev/null
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CloudKit.framework
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/CloudKit.framework
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/CloudKit.framework

That mac’s clang -v reports:

vharron-macpro3:test vharron$ cat main.cpp

int main() {return 0;}
vharron-macpro3:test vharron$ clang -v main.cpp
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
[snip]
clang -cc1 version 6.0 based upon LLVM 3.5svn default target x86_64-apple-darwin13.4.0

ignoring nonexistent directory “/usr/include/c++/v1”
ignoring nonexistent directory “/usr/local/include”
#include “…” search starts here:
#include <…> search starts here:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/…/include/c++/v1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/…/lib/clang/6.0/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
/usr/include
/System/Library/Frameworks (framework directory)
/Library/Frameworks (framework directory)
End of search list.
[snip]

Notice that
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks

Is not in the list.

I think that upgrading to Xcode 6.2 is what made clang lose this path.

On a XCode 6.1.1 mac, we have the path, but we get a different compile error (I’ll send that to you when I can reproduce it.):

[snip]

clang -cc1 version 6.0 based upon LLVM 3.5svn default target x86_64-apple-darwin13.4.0
ignoring nonexistent directory “/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/c++/v1”
ignoring nonexistent directory “/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/local/include”
ignoring nonexistent directory “/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/Library/Frameworks”
#include “…” search starts here:
#include <…> search starts here:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/…/include/c++/v1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/…/lib/clang/6.0/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks (framework directory)
End of search list.

[snip]

emoji_u260e.png

Note that the 6.1.1 mac’s clang does include

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks

(It gets past the include failure)

emoji_u260e.png

I think I see… on my machine CloudKit is in PrivateFrameworks

If you replace the #import with an @class CKDatabase; forward-declaration does anything improve?

Failing even that, I will need to change this test to use a more publicly available class

stdout: clang -g -O0 -fno-builtin -arch x86_64 -I/Users/vharron/ll/fresh/lldb/test/make/…/…/include -include /Users/vharron/ll/fresh/lldb/test/make/test_common.h -c -o main.o main.m

stderr: main.m:10:23: error: attempting to use the forward class ‘CKDatabase’ as superclass of ‘SubClass’
@interface SubClass : SuperClass

main.m:8:20: note: expanded from macro 'SuperClass'
#define SuperClass CKDatabase
^
main.m:6:8: note: forward declaration of class here
@class CKDatabase;
^
main.m:14:12: error: cannot define class extension for undefined class 'CKDatabase'
@interface SuperClass ()
^
main.m:8:20: note: expanded from macro 'SuperClass'
#define SuperClass CKDatabase
^
main.m:6:8: note: forward declaration of class here
@class CKDatabase;
^
main.m:25:17: error: cannot find interface declaration for 'CKDatabase'
@implementation SuperClass (MySuperClass)
^
main.m:8:20: note: expanded from macro 'SuperClass'
#define SuperClass CKDatabase
^
[snip]

![emoji_u260e.png|28x28](upload://9qrzk0pIBZhepAcSWcs6kRMxSEe.png)

XFAIL’d the test and added

http://llvm.org/pr23504

emoji_u260e.png