[LLVMdev] "multiple definition of .. " in clang 2.8

John McCall rjmccall at apple.com
Tue Nov 2 10:22:02 PDT 2010

On Nov 2, 2010, at 9:56 AM, Xinfinity wrote:
> It seems that the problem occurs from the optimization level. In the 2.7
> version I was using -O0 and in 2.8 I tested the same benchmarks with -O3.

For the record, this post is more appropriate for cfe-dev.

> clang -O0 works fine, while clang -O3 makes redefinitions (probably it is
> related to inlining) of the functions from stdlib.h, math.h and some other
> libraries. To give one example, function atoi is defined in the generated
> *.ll file: 

Please file a bug (http://llvm.org/bugs) with some preprocessed source.  It
looks like your standard headers are doing something very strange.  Can
you tell us something about your system (architecture, OS, distribution)?


More information about the llvm-dev mailing list