[cfe-dev] Print AST in ObjC

Alex Denisov via cfe-dev cfe-dev at lists.llvm.org
Wed Oct 2 12:40:24 PDT 2019


The framework search you are using is for macOS frameworks, if you want to
dump ast for iOS related code, then you need to point it to the iOS SDK
frameworks.
Try to look at xcrun command for some hints on how to get the right path.

I hope it helps.

Cheers,
Alex.

On Tue 1. Oct 2019 at 15:24, Alberto Lagos via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> Sorry, i forgot to tell that clang show this error after run the command
> that i posted in the previous message:
>
> MandatoryViewController.m:1:9: fatal error: module 'UIKit' not found
> @import UIKit;
>
> Thanks!
>
> El mar., 1 oct. 2019 a las 9:15, Alberto Lagos (<alberto.lagos at gmail.com>)
> escribió:
>
>> Hello,
>>
>> I want to be able to print the AST of a .m file (Objective-C) i tried
>> with
>>
>>  clang -fmodules -F/System/Library/Frameworks -Xclang -ast-dump
>> -fsyntax-only MandatoryViewController.m
>>
>> This file is part of a xcode file, so it has some dependencies.
>>
>> Do any of you know what i need to do? so this can work?
>>
>> Thanks in advance.
>>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20191002/3f453bc2/attachment.html>


More information about the cfe-dev mailing list