40 lines · c
1//===- AMDGPUDelayedMCExpr.h - Delayed MCExpr resolve -----------*- C++ -*-===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLVM_LIB_TARGET_AMDGPU_UTILS_AMDGPUDELAYEDMCEXPR_H10#define LLVM_LIB_TARGET_AMDGPU_UTILS_AMDGPUDELAYEDMCEXPR_H11 12#include "llvm/BinaryFormat/MsgPackDocument.h"13#include <deque>14 15namespace llvm {16class MCExpr;17 18class DelayedMCExprs {19 struct Expr {20 msgpack::DocNode &DN;21 msgpack::Type Type;22 const MCExpr *ExprValue;23 Expr(msgpack::DocNode &DN, msgpack::Type Type, const MCExpr *ExprValue)24 : DN(DN), Type(Type), ExprValue(ExprValue) {}25 };26 27 std::deque<Expr> DelayedExprs;28 29public:30 bool resolveDelayedExpressions();31 void assignDocNode(msgpack::DocNode &DN, msgpack::Type Type,32 const MCExpr *ExprValue);33 void clear();34 bool empty();35};36 37} // end namespace llvm38 39#endif // LLVM_LIB_TARGET_AMDGPU_UTILS_AMDGPUDELAYEDMCEXPR_H40