Objective-C

OC

Objective-C 程序的编译过程

通过命令查看某个OC源文件编译过程: clang -ccc-print-phases xxx.m

Clang前端处理

  1. Lexical Analysis (词法分析)
  2. Grammatical Analysis (语法分析)
  3. Semantic Analysis (语义分析)
  4. Intermediate representation (中间代码生成)

LLVM后端处理

  1. Generate machine language

预处理 processing

编译 Compilation

汇编 Assembly

链接 Linking

运行时处理 Runtime Handle

参考文章

  1. iOS编译过程的原理和应用
  2. Objective-C源文件编译过程

Comments