Can LTO for clang optimize across C and C++ methods [duplicate]
问题 This question already has an answer here : Can LTO for gcc or clang optimize across C and C++ methods (1 answer) Closed last year . If link-time optimization (LTO) is being used with clang, is it possible that code can be optimized across the C and C++ language boundary? For example, can a C function be inlined into a C++ caller, or vice-versa? 回答1: AFAIK, yes since Clang produces LLVM intermediate representation, and LTO happens on that LLVM bytecode. BTW any kind of link-time-optimization