From: Hans Wennborg Date: Tue, 2 Feb 2016 23:26:23 +0000 (+0000) Subject: Merging r259598: X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fb740de72cc6c134055128bcef92bf1a612657d7;p=clang Merging r259598: ------------------------------------------------------------------------ r259598 | rsmith | 2016-02-02 15:11:49 -0800 (Tue, 02 Feb 2016) | 7 lines 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! ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_38@259603 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/Address.h b/lib/CodeGen/Address.h index 9d145fa26b..334308081f 100644 --- a/lib/CodeGen/Address.h +++ b/lib/CodeGen/Address.h @@ -103,24 +103,16 @@ public: } }; -} } -namespace llvm { - // Present a minimal LLVM-like casting interface. - template inline U cast(clang::CodeGen::Address addr) { - return U::castImpl(addr); - } - template inline bool isa(clang::CodeGen::Address addr) { - return U::isaImpl(addr); - } +// Present a minimal LLVM-like casting interface. +template inline U cast(CodeGen::Address addr) { + return U::castImpl(addr); +} +template 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