2015-06-02 02:25:12 +02:00
|
|
|
//===- MCSymbolELF.h - -----------------------------------------*- C++ -*-===//
|
|
|
|
//
|
2019-01-19 09:50:56 +01:00
|
|
|
// 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
|
2015-06-02 02:25:12 +02:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_MC_MCSYMBOLELF_H
|
|
|
|
#define LLVM_MC_MCSYMBOLELF_H
|
|
|
|
|
|
|
|
#include "llvm/MC/MCSymbol.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
class MCSymbolELF : public MCSymbol {
|
|
|
|
/// An expression describing how to calculate the size of a symbol. If a
|
|
|
|
/// symbol has no size this field will be NULL.
|
|
|
|
const MCExpr *SymbolSize = nullptr;
|
|
|
|
|
|
|
|
public:
|
|
|
|
MCSymbolELF(const StringMapEntry<bool> *Name, bool isTemporary)
|
2015-06-08 19:17:09 +02:00
|
|
|
: MCSymbol(SymbolKindELF, Name, isTemporary) {}
|
2015-06-02 02:25:12 +02:00
|
|
|
void setSize(const MCExpr *SS) { SymbolSize = SS; }
|
|
|
|
|
|
|
|
const MCExpr *getSize() const { return SymbolSize; }
|
|
|
|
|
2015-06-02 22:38:46 +02:00
|
|
|
void setVisibility(unsigned Visibility);
|
|
|
|
unsigned getVisibility() const;
|
|
|
|
|
|
|
|
void setOther(unsigned Other);
|
|
|
|
unsigned getOther() const;
|
|
|
|
|
|
|
|
void setType(unsigned Type) const;
|
|
|
|
unsigned getType() const;
|
|
|
|
|
|
|
|
void setBinding(unsigned Binding) const;
|
|
|
|
unsigned getBinding() const;
|
|
|
|
|
2015-06-04 07:59:23 +02:00
|
|
|
bool isBindingSet() const;
|
2015-06-03 23:18:03 +02:00
|
|
|
|
2015-06-03 23:52:06 +02:00
|
|
|
void setIsWeakrefUsedInReloc() const;
|
|
|
|
bool isWeakrefUsedInReloc() const;
|
|
|
|
|
2015-06-03 23:41:59 +02:00
|
|
|
void setIsSignature() const;
|
|
|
|
bool isSignature() const;
|
|
|
|
|
2015-06-02 02:25:12 +02:00
|
|
|
static bool classof(const MCSymbol *S) { return S->isELF(); }
|
2015-06-04 07:59:23 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
void setIsBindingSet() const;
|
2015-06-02 02:25:12 +02:00
|
|
|
};
|
2015-06-23 11:49:53 +02:00
|
|
|
}
|
2015-06-02 02:25:12 +02:00
|
|
|
|
|
|
|
#endif
|