GCC :

Last login: Sat Feb 18 12:05:46 on console
dengjiangzhoudeiMac:~ dengjiangzhou$ ls

Applications        Music           paros
Desktop         Pictures        point.sil
Documents       Public          point点sil.docx
Downloads       hi          百度云同步盘
Library         iOS-Images-Extractor
Movies          module3

dengjiangzhoudeiMac:~ dengjiangzhou$ cd ~/Desktop
dengjiangzhoudeiMac:Desktop dengjiangzhou$ touch main.m
dengjiangzhoudeiMac:Desktop dengjiangzhou$ open main.m
dengjiangzhoudeiMac:Desktop dengjiangzhou$ clang -fmodules main.m -o mainDeng
dengjiangzhoudeiMac:Desktop dengjiangzhou$ clang -fmodules -fsyntax-only -Xclang -ast-dump main.m

TranslationUnitDecl 0x7ff53b8058d0 <> 
|-TypedefDecl 0x7ff53b805dc8 <>  implicit __int128_t '__int128'
| `-BuiltinType 0x7ff53b805b20 '__int128'
|-TypedefDecl 0x7ff53b805e28 <>  implicit __uint128_t 'unsigned __int128'
| `-BuiltinType 0x7ff53b805b40 'unsigned __int128'
|-TypedefDecl 0x7ff53b805eb8 <>  implicit SEL 'SEL *'
| `-PointerType 0x7ff53b805e80 'SEL *'
|   `-BuiltinType 0x7ff53b805d30 'SEL'
|-TypedefDecl 0x7ff53b805f98 <>  implicit id 'id'
| `-ObjCObjectPointerType 0x7ff53b805f40 'id' imported
|   `-ObjCObjectType 0x7ff53b805f10 'id' imported
|-TypedefDecl 0x7ff53b806078 <>  implicit Class 'Class'
| `-ObjCObjectPointerType 0x7ff53b806020 'Class'
|   `-ObjCObjectType 0x7ff53b805ff0 'Class'
|-ObjCInterfaceDecl 0x7ff53b8060c8 <>  implicit Protocol
|-TypedefDecl 0x7ff53b806418 <>  implicit __NSConstantString 'struct __NSConstantString_tag'
| `-RecordType 0x7ff53b806230 'struct __NSConstantString_tag'
|   `-Record 0x7ff53b806190 '__NSConstantString_tag'
|-TypedefDecl 0x7ff53b8064a8 <>  implicit __builtin_ms_va_list 'char *'
| `-PointerType 0x7ff53b806470 'char *'
|   `-BuiltinType 0x7ff53b805960 'char'
|-TypedefDecl 0x7ff53b834d78 <>  implicit __builtin_va_list 'struct __va_list_tag [1]'
| `-ConstantArrayType 0x7ff53b834d20 'struct __va_list_tag [1]' 1 
|   `-RecordType 0x7ff53b8065a0 'struct __va_list_tag'
|     `-Record 0x7ff53b8064f8 '__va_list_tag'
|-ImportDecl 0x7ff53b835ab0  col:1 implicit Foundation
|-FunctionDecl 0x7ff53b835b38  line:3:5 main 'int ()'
| `-CompoundStmt 0x7ff53b2e9150 
|   |-CallExpr 0x7ff53b2e90d0  'void'
|   | |-ImplicitCastExpr 0x7ff53b2e90b8  'void (*)(id, ...)' 
|   | | `-DeclRefExpr 0x7ff53b2e8fa0  'void (id, ...)' Function 0x7ff53b2dbe60 'NSLog' 'void (id, ...)'
|   | `-ImplicitCastExpr 0x7ff53b2e9100  'id':'id' 
|   |   `-ObjCStringLiteral 0x7ff53b2e9040  'NSString *'
|   |     `-StringLiteral 0x7ff53b2e9008  'char [12]' lvalue "Hello world"
|   `-ReturnStmt 0x7ff53b2e9138 
|     `-IntegerLiteral 0x7ff53b2e9118  'int' 0
`-

dengjiangzhoudeiMac:Desktop dengjiangzhou$ clang -S main.m -o main.s
dengjiangzhoudeiMac:Desktop dengjiangzhou$ vi main.s
dengjiangzhoudeiMac:Desktop dengjiangzhou$

你可能感兴趣的:(GCC :)