[Patch] Fail to build with gcc version 4.8.1 20130904 (r202243)


Since a few days, the LLVM toolchain package fails to build with this error:

/tmp/buildd/llvm-toolchain-snapshot-3.4~svn192427/tools/clang/lib/Basic/Targets.cpp:3615:15: error: 'static bool {anonymous}::ARMTargetInfo::shouldUseInlineAtomic(const llvm::Triple&)' cannot be overloaded
   static bool shouldUseInlineAtomic(const llvm::Triple &T) {
/tmp/buildd/llvm-toolchain-snapshot-3.4~svn192427/tools/clang/lib/Basic/Targets.cpp:3585:15: error: with 'static bool {anonymous}::ARMTargetInfo::shouldUseInlineAtomic(const llvm::Triple&)'
   static bool shouldUseInlineAtomic(const llvm::Triple &T) {

Here is indeed a duplicated declaration.
The attached patch fixes the issue for me.

Is it ok applying in the source tree ?


removeduplicatedeclaration.diff (1.55 KB)

Is it possible you have a local patch adding one of these two function
definitions? The function is only declared once in SVN, and the file has
not changed since r192045.