[llvm-branch-commits] [cfe-branch] r259603 - Merging r259598:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Feb 2 15:26:23 PST 2016


Author: hans
Date: Tue Feb  2 17:26:23 2016
New Revision: 259603

URL: http://llvm.org/viewvc/llvm-project?rev=259603&view=rev
Log:
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!

------------------------------------------------------------------------

Modified:
    cfe/branches/release_38/   (props changed)
    cfe/branches/release_38/lib/CodeGen/Address.h

Propchange: cfe/branches/release_38/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb  2 17:26:23 2016
@@ -1,4 +1,4 @@
 /cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:257652,257695,257710,257831,257838,257853,257861,257869-257871,257947,258110,258396,259260
+/cfe/trunk:257652,257695,257710,257831,257838,257853,257861,257869-257871,257947,258110,258396,259260,259598
 /cfe/trunk/test:170344
 /cfe/trunk/test/SemaTemplate:126920

Modified: cfe/branches/release_38/lib/CodeGen/Address.h
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_38/lib/CodeGen/Address.h?rev=259603&r1=259602&r2=259603&view=diff
==============================================================================
--- cfe/branches/release_38/lib/CodeGen/Address.h (original)
+++ cfe/branches/release_38/lib/CodeGen/Address.h Tue Feb  2 17:26:23 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




More information about the llvm-branch-commits mailing list