.m 文件是objective-c代码,由objective-c编译器处理(扩展名代表message)
c编译器处理.c文件
c++编译器处理.cpp文件。
在xcode中,所有的这些编译工作默认由LLVM处理,这个编译器能够处理c语言的全部三个变体。
关于LLVM的介绍见下面:
LLVM (formerly Low Level Virtual Machine) is a compiler infrastructure written in C++; it is designed for compile-time, link-time, run-time, and "idle-time" optimization of programs written in arbitrary programming languages. Originally implemented for Cand C++, the language-agnostic design (and the success) of LLVM has since spawned a wide variety of front ends: languages with compilers that use LLVM include ActionScript, Ada, D, Fortran, OpenGL Shading Language, Haskell, Java bytecode, Julia, Objective-C, Python, Ruby, Rust, Scala and C#.
The LLVM project started in 2000 at the University of Illinois at Urbana–Champaign, under the direction of Vikram Adve and Chris Lattner. LLVM was originally developed as a research infrastructure to investigate dynamic compilationtechniques for static and dynamic programming languages. LLVM was released under the University of Illinois/NCSA Open Source License, a non-copyleft license. In 2005, Apple Inc. hired Lattner and formed a team to work on the LLVM system for various uses within Apple's development systems. LLVM is an integral part of Apple's latest development tools for Mac OS X and iOS.