Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:44:15

0001 //===- MCSymbolELF.h -  -----------------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 #ifndef LLVM_MC_MCSYMBOLELF_H
0009 #define LLVM_MC_MCSYMBOLELF_H
0010 
0011 #include "llvm/MC/MCSymbol.h"
0012 #include "llvm/MC/MCSymbolTableEntry.h"
0013 
0014 namespace llvm {
0015 class MCSymbolELF : public MCSymbol {
0016   /// An expression describing how to calculate the size of a symbol. If a
0017   /// symbol has no size this field will be NULL.
0018   const MCExpr *SymbolSize = nullptr;
0019 
0020 public:
0021   MCSymbolELF(const MCSymbolTableEntry *Name, bool isTemporary)
0022       : MCSymbol(SymbolKindELF, Name, isTemporary) {}
0023   void setSize(const MCExpr *SS) { SymbolSize = SS; }
0024 
0025   const MCExpr *getSize() const { return SymbolSize; }
0026 
0027   void setVisibility(unsigned Visibility);
0028   unsigned getVisibility() const;
0029 
0030   void setOther(unsigned Other);
0031   unsigned getOther() const;
0032 
0033   void setType(unsigned Type) const;
0034   unsigned getType() const;
0035 
0036   void setBinding(unsigned Binding) const;
0037   unsigned getBinding() const;
0038 
0039   bool isBindingSet() const;
0040 
0041   void setIsWeakrefUsedInReloc() const;
0042   bool isWeakrefUsedInReloc() const;
0043 
0044   void setIsSignature() const;
0045   bool isSignature() const;
0046 
0047   void setMemtag(bool Tagged);
0048   bool isMemtag() const;
0049 
0050   static bool classof(const MCSymbol *S) { return S->isELF(); }
0051 
0052 private:
0053   void setIsBindingSet() const;
0054 };
0055 }
0056 
0057 #endif