[lfs-patches] r3695 - trunk/chromium

dj at higgs.linuxfromscratch.org dj at higgs.linuxfromscratch.org
Sun Jan 28 14:03:28 PST 2018


Author: dj
Date: Sun Jan 28 14:03:28 2018
New Revision: 3695

Log:
Add chromium-64.0.3282.119-constexpr-1.patch.

Added:
   trunk/chromium/chromium-64.0.3282.119-constexpr-1.patch

Added: trunk/chromium/chromium-64.0.3282.119-constexpr-1.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/chromium/chromium-64.0.3282.119-constexpr-1.patch	Sun Jan 28 14:03:28 2018	(r3695)
@@ -0,0 +1,98 @@
+Submitted By:            DJ Lucas <dj_AT_linuxfromscratch_DOT_org>
+Date:                    2018-01-28
+Initial Package Version: 64.0.3282.119
+Upstream Status:         Committed
+Origin:                  Upstream
+Description:             Corrects error call to non-constexpr function
+
+
+From 030017a4855c7b6e7f2ff8d9566c146f31eb301b Mon Sep 17 00:00:00 2001
+From: Kai Ninomiya <kainino at chromium.org>
+Date: Wed, 06 Dec 2017 14:06:53 -0800
+Subject: [PATCH] Mark StaticType related functions as constexpr
+
+Fixes compilation on some versions of GCC and probably Clang.
+
+Follow-up to http://crrev.com/c/786317
+
+Bug: angleproject:1432
+Change-Id: I3fc3ad0f65492f9543eb27fcdce6ca29a9ad06e5
+Reviewed-on: https://chromium-review.googlesource.com/812220
+Reviewed-by: Jamie Madill <jmadill at chromium.org>
+Commit-Queue: Kai Ninomiya <kainino at chromium.org>
+---
+
+diff --git a/third_party/angle/src/compiler/translator/StaticType.h b/third_party/angle/src/compiler/translator/StaticType.h
+index e26e5ff..30b391a 100644
+--- a/third_party/angle/src/compiler/translator/StaticType.h
++++ b/third_party/angle/src/compiler/translator/StaticType.h
+@@ -160,7 +160,7 @@
+           TPrecision precision,
+           TQualifier qualifier,
+           unsigned char secondarySize>
+-const TType *GetForVecMatHelper(unsigned char primarySize)
++constexpr const TType *GetForVecMatHelper(unsigned char primarySize)
+ {
+     static_assert(basicType == EbtFloat || basicType == EbtInt || basicType == EbtUInt ||
+                       basicType == EbtBool,
+@@ -186,7 +186,7 @@
+ template <TBasicType basicType,
+           TPrecision precision = EbpUndefined,
+           TQualifier qualifier = EvqGlobal>
+-const TType *GetForVecMat(unsigned char primarySize, unsigned char secondarySize = 1)
++constexpr const TType *GetForVecMat(unsigned char primarySize, unsigned char secondarySize = 1)
+ {
+     static_assert(basicType == EbtFloat || basicType == EbtInt || basicType == EbtUInt ||
+                       basicType == EbtBool,
+@@ -208,7 +208,7 @@
+ }
+ 
+ template <TBasicType basicType, TPrecision precision = EbpUndefined>
+-const TType *GetForVec(TQualifier qualifier, unsigned char size)
++constexpr const TType *GetForVec(TQualifier qualifier, unsigned char size)
+ {
+     switch (qualifier)
+     {
+diff --git a/third_party/angle/src/compiler/translator/SymbolTable.cpp b/third_party/angle/src/compiler/translator/SymbolTable.cpp
+index adf1e4e..90d4c15 100644
+--- a/third_party/angle/src/compiler/translator/SymbolTable.cpp
++++ b/third_party/angle/src/compiler/translator/SymbolTable.cpp
+@@ -236,7 +236,7 @@
+         pop();
+ }
+ 
+-bool IsGenType(const TType *type)
++constexpr bool IsGenType(const TType *type)
+ {
+     if (type)
+     {
+@@ -248,7 +248,7 @@
+     return false;
+ }
+ 
+-bool IsVecType(const TType *type)
++constexpr bool IsVecType(const TType *type)
+ {
+     if (type)
+     {
+diff --git a/third_party/angle/src/compiler/translator/Types.h b/third_party/angle/src/compiler/translator/Types.h
+index 04f46f1..a54d447 100644
+--- a/third_party/angle/src/compiler/translator/Types.h
++++ b/third_party/angle/src/compiler/translator/Types.h
+@@ -142,13 +142,13 @@
+     {
+     }
+ 
+-    TBasicType getBasicType() const { return type; }
++    constexpr TBasicType getBasicType() const { return type; }
+     void setBasicType(TBasicType t);
+ 
+     TPrecision getPrecision() const { return precision; }
+     void setPrecision(TPrecision p) { precision = p; }
+ 
+-    TQualifier getQualifier() const { return qualifier; }
++    constexpr TQualifier getQualifier() const { return qualifier; }
+     void setQualifier(TQualifier q) { qualifier = q; }
+ 
+     bool isInvariant() const { return invariant; }
+


More information about the patches mailing list