Commit 5a7e20ed by Olli Etuaho Committed by Commit Bot

Fix compiler allocations accidentally done outside memory pool

Qualifier data structures were being accidentally allocated on the regular heap and never being freed inside the compiler due to missing POOL_ALLOCATOR_NEW_DELETE macros. Add in the macros where needed. Also fix up include directives in QualifierTypes.h/.cpp to use the full path of files from ANGLE. BUG=angleproject:1442 TEST=angle_unittests Change-Id: Ib54f3cd3ab0f768fed9f0215d795ff493be513e0 Reviewed-on: https://chromium-review.googlesource.com/380538Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 14718767
......@@ -4,9 +4,9 @@
// found in the LICENSE file.
//
#include "QualifierTypes.h"
#include "compiler/translator/QualifierTypes.h"
#include "Diagnostics.h"
#include "compiler/translator/Diagnostics.h"
#include <algorithm>
......
......@@ -7,11 +7,9 @@
#ifndef COMPILER_TRANSLATOR_QUALIFIER_TYPES_H_
#define COMPILER_TRANSLATOR_QUALIFIER_TYPES_H_
#include "BaseTypes.h"
#include "common/angleutils.h"
#include "Types.h"
#include <vector>
#include "compiler/translator/BaseTypes.h"
#include "compiler/translator/Types.h"
class TDiagnostics;
......@@ -34,8 +32,8 @@ enum TQualifierType
class TQualifierWrapperBase : angle::NonCopyable
{
public:
POOL_ALLOCATOR_NEW_DELETE();
TQualifierWrapperBase(const TSourceLoc &line) : mLine(line) {}
virtual ~TQualifierWrapperBase(){};
virtual TQualifierType getType() const = 0;
......@@ -147,9 +145,10 @@ struct TTypeQualifier
class TTypeQualifierBuilder : angle::NonCopyable
{
public:
using QualifierSequence = std::vector<const TQualifierWrapperBase *>;
using QualifierSequence = TVector<const TQualifierWrapperBase *>;
public:
POOL_ALLOCATOR_NEW_DELETE();
TTypeQualifierBuilder(const TStorageQualifierWrapper *scope, int shaderVersion);
// Adds the passed qualifier to the end of the sequence.
void appendQualifier(const TQualifierWrapperBase *qualifier);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment