Hash :
e996d187
Author :
Date :
2024-03-19T13:29:24
Use TIntermRebuild for SeparateStructFromFunctionDeclarations This now handles the case of nested function calls to functions that define a struct in the return type all resolving to the correct re-written function. Bug: chromium:329271490 Change-Id: I43904e09ec9c284c1b51c09b2caaab253f7b29b9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5376613 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
//
// Copyright 2024 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.
//
// SeparateStructFromFunctionDeclarations: Separate struct declarations from
// function declaration return type. If necessary gives nameless structs
// internal names.
//
// For example:
// struct Foo { int a; } foo();
// becomes:
// struct Foo { int a; };
// Foo foo();
//
#ifndef COMPILER_TRANSLATOR_TREEOPS_SEPARATESTRUCTFROMFUNCTIONDECLARATIONS_H_
#define COMPILER_TRANSLATOR_TREEOPS_SEPARATESTRUCTFROMFUNCTIONDECLARATIONS_H_
#include "common/angleutils.h"
namespace sh
{
class TCompiler;
class TIntermBlock;
class TSymbolTable;
[[nodiscard]] bool SeparateStructFromFunctionDeclarations(TCompiler &compiler, TIntermBlock &root);
} // namespace sh
#endif // COMPILER_TRANSLATOR_TREEOPS_SEPARATESTRUCTFROMFUNCTIONDECLARATIONS_H_