Hash :
56229f1b
Author :
Date :
2017-07-10T14:16:33
Remove TIntermediate::addConstantUnion This includes asserts in TConstantUnion to reveal incorrect usage of union - reading a different field of an union that has last been set is undefined behavior in C++. Existing issues with accessing incorrect fields of constant unions are fixed. BUG=angleproject:1490 TEST=angle_unittests Change-Id: Idd6b7a871d73e2928f117a9348c92043612fab82
//
// Copyright (c) 2002-2014 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
#ifndef COMPILER_TRANSLATOR_INTERMEDIATE_H_
#define COMPILER_TRANSLATOR_INTERMEDIATE_H_
#include "compiler/translator/IntermNode.h"
namespace sh
{
//
// Set of helper functions to help build the tree.
// TODO(oetuaho@nvidia.com): Clean this up, it doesn't need to be a class.
//
class TIntermediate
{
public:
static TIntermBlock *EnsureBlock(TIntermNode *node);
private:
TIntermediate(){};
};
} // namespace sh
#endif // COMPILER_TRANSLATOR_INTERMEDIATE_H_