diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-02-02 23:11:49 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-02-02 23:11:49 +0000 |
commit | ad609d56d2668b467294e89276e6f1abd99e431d (patch) | |
tree | c64f3b793b66367e801e02faedc89371162e9de4 | |
parent | b6940115a874b2d23c9c282fcf4b2922183af467 (diff) | |
download | bcm5719-llvm-ad609d56d2668b467294e89276e6f1abd99e431d.tar.gz bcm5719-llvm-ad609d56d2668b467294e89276e6f1abd99e431d.zip |
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!
llvm-svn: 259598
-rw-r--r-- | clang/lib/CodeGen/Address.h | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/clang/lib/CodeGen/Address.h b/clang/lib/CodeGen/Address.h index 9d145fa26b5..334308081ff 100644 --- a/clang/lib/CodeGen/Address.h +++ b/clang/lib/CodeGen/Address.h @@ -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 |