mirror of https://github.com/microsoft/clang.git
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/trunk@259598 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
44f73317fc
commit
2436a40803
|
@ -104,23 +104,15 @@ public:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
// 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 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);
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue