In late 2000, Lattner joined the University of Illinois at Urbana-Champaign as a research assistant and M.Sc. student. While working with Vikram Adve, he designed and began implementing LLVM, an innovative infrastructure for optimizing compilers, which was the subject of his 2002 M.Sc. thesis. He completed his Ph.D. in 2005, researching new techniques for optimizing pointer-intensive programs and adding them to LLVM. In 2005, Apple Inc. hired Lattner to begin work bringing LLVM to production quality for use in Apple products. Over time, Lattner built out the technology, personally implementing many major new features in LLVM, formed and built a team of LLVM developers at Apple, started the Clang project, took responsibility for evolving Objective-C, and nurtured the open source community. Apple first shipped LLVM-based technology in the 10.5 OpenGL stack as a just-in-time compiler, shipped the llvm-gcc compiler in the integrated development environment Xcode 3.1, Clang 1.0 in Xcode 3.2, Clang 2.0 in Xcode 4.0, and LLDB, libc++, assemblers, and disassembler technology in later releases. Lattner's recent work involves designing, implementing, and evangelizing the LLVM and Clang compilers, productizing and driving the debugger LLDB, and overseeing development of the low-level toolchain. As of 2016, LLVM technologies are the core of Apple's developer tools and the default toolchain on FreeBSD. In June 2010, the Association for Computing MachinerySpecial Interest Group on programming languages gave Lattner its inaugural ACM SIGPLAN Programming Languages Software Award "for his design and development of the Low Level Virtual Machine", noting that Professor Adve has stated: "Lattner’s talent as a compiler architect, together with his programming skills, technical vision, and leadership ability were crucial to the success of LLVM." In April 2013, the ACM awarded Lattner its Software System Award, which is presented to anyone "recognized for developing a software system that has had a lasting influence, reflected in contributions to concepts, in commercial acceptance, or both".
Swift is an open source programming language with first-class functions for iOS and macOS development, created by Apple and introduced at Apple's developer conferenceApple Worldwide Developers Conference 2014. Swift is designed to coexist with Objective-C, the object-oriented programming language formerly preferred by Apple, and to be more resilient against erroneous code. It is built with the LLVM compiler included in Xcode 6. Lattner began developing Swift in 2010, with the eventual collaboration of many other programmers. On June 2, 2014, the WWDC app became the first publicly released app that used Swift. Lattner announced that the Project Lead role had been transferred to Ted Kremenek, and that Lattner would leave Apple in January 2017.