//===- MCSymbolXCOFF.h -  ----------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_MC_MCSYMBOLXCOFF_H
#define LLVM_MC_MCSYMBOLXCOFF_H

#include "llvm/BinaryFormat/XCOFF.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/IR/GlobalValue.h"

namespace llvm {

class MCSymbolXCOFF : public MCSymbol {
  // The IR symbol this MCSymbolXCOFF is based on. It is set on function
  // entry point symbols when they are the callee operand of a direct call
  // SDNode.
  const GlobalValue *GV = nullptr;

public:
  MCSymbolXCOFF(const StringMapEntry<bool> *Name, bool isTemporary)
      : MCSymbol(SymbolKindXCOFF, Name, isTemporary) {}

  void setGlobalValue(const GlobalValue *G) { GV = G; }
  const GlobalValue *getGlobalValue() const { return GV; }

  static bool classof(const MCSymbol *S) { return S->isXCOFF(); }
};

} // end namespace llvm

#endif // LLVM_MC_MCSYMBOLXCOFF_H

//===- MCSymbolXCOFF.h -  ----------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_MC_MCSYMBOLXCOFF_H
#define LLVM_MC_MCSYMBOLXCOFF_H

#include "llvm/BinaryFormat/XCOFF.h"
#include "llvm/MC/MCSymbol.h"

namespace llvm {

class GlobalValue;

class MCSymbolXCOFF : public MCSymbol {
  // The IR symbol this MCSymbolXCOFF is based on. It is set on function
  // entry point symbols when they are the callee operand of a direct call
  // SDNode.
  const GlobalValue *GV = nullptr;

public:
  MCSymbolXCOFF(const StringMapEntry<bool> *Name, bool isTemporary)
      : MCSymbol(SymbolKindXCOFF, Name, isTemporary) {}

  void setGlobalValue(const GlobalValue *G) { GV = G; }
  const GlobalValue *getGlobalValue() const { return GV; }

  static bool classof(const MCSymbol *S) { return S->isXCOFF(); }
};

} // end namespace llvm

#endif // LLVM_MC_MCSYMBOLXCOFF_H

Work around a circular dependency between IR and MC introduced in r362735
Work around a circular dependency between IR and MC introduced in r362735

I replaced the circular library dependency with a forward declaration,
but it is only a workaround, not a real fix.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@362782 91177308-0d34-0410-b5e6-96231b3b80d8
