llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.24k stars 12.07k forks source link

LLVM header files cause parse errors when compiling Objective-C++/Cocoa project #15451

Open llvmbot opened 11 years ago

llvmbot commented 11 years ago
Bugzilla Link 15079
Version 3.2
OS MacOS X
Reporter LLVM Bugzilla Contributor

Extended Description

Objective-C++ code that includes both the Cocoa framework and the LLVM header files fails to compile. The problem is that certain function and variable names in the C++ LLVM source code conflict with macros defined on the Objective-C side.

For a workaround, see http://stackoverflow.com/questions/14527423/including-c-header-files-in-objective-c-when-they-conflict-with-objective-c

In addition to fixing these individual errors, maybe using LLVM in an Objective-C++/Cocoa project could be added to the test process.

llvmbot commented 10 years ago

I don't see a file IntegersSubsetMapping.h in current trunk, so I think my earlier patch completely addresses this bug.

llvmbot commented 10 years ago

Patch CommandLine.h to allow inclusion within ObjC++ .mm files. I've checked that this doesn't introduce any regressions with 'make check-all'.