r259598 - Work around build failure due to GCC 4.8.1 bug. We don't completely understand
Hans Wennborg via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 2 15:30:55 PST 2016
Yes! r259603.
Cheers,
Hans
On Tue, Feb 2, 2016 at 3:17 PM, Richard Smith <richard at metafoo.co.uk> wrote:
> Hans, this fixes a compile failure with one of our supported host
> compilers (GCC 4.8.1). Can we get this patch into 3.8?
>
> On Tue, Feb 2, 2016 at 3:11 PM, Richard Smith via cfe-commits
> <cfe-commits at lists.llvm.org> wrote:
>> Author: rsmith
>> Date: Tue Feb 2 17:11:49 2016
>> New Revision: 259598
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=259598&view=rev
>> Log:
>> Work around build failure due to GCC 4.8.1 bug. We don't completely understand
>> the details of the bug, but avoiding overloading llvm::cast with another
>> function template sidesteps it.
>>
>> See gcc.gnu.org/PR58022 for details of the bug, and llvm.org/PR26362 for more
>> backgound on how it manifested in Clang. Patch by Igor Sugak!
>>
>> Modified:
>> cfe/trunk/lib/CodeGen/Address.h
>>
>> Modified: cfe/trunk/lib/CodeGen/Address.h
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/Address.h?rev=259598&r1=259597&r2=259598&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/CodeGen/Address.h (original)
>> +++ cfe/trunk/lib/CodeGen/Address.h Tue Feb 2 17:11:49 2016
>> @@ -104,23 +104,15 @@ public:
>> };
>>
>> }
>> -}
>>
>> -namespace llvm {
>> - // Present a minimal LLVM-like casting interface.
>> - template <class U> inline U cast(clang::CodeGen::Address addr) {
>> - return U::castImpl(addr);
>> - }
>> - template <class U> inline bool isa(clang::CodeGen::Address addr) {
>> - return U::isaImpl(addr);
>> - }
>> +// Present a minimal LLVM-like casting interface.
>> +template <class U> inline U cast(CodeGen::Address addr) {
>> + return U::castImpl(addr);
>> +}
>> +template <class U> inline bool isa(CodeGen::Address addr) {
>> + return U::isaImpl(addr);
>> }
>>
>> -namespace clang {
>> - // Make our custom isa and cast available in namespace clang, to mirror
>> - // what we do for LLVM's versions in Basic/LLVM.h.
>> - using llvm::isa;
>> - using llvm::cast;
>> }
>>
>> #endif
>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list