From e51018c2299b60912b7b4d1aaf6e83f1e905edb5 Mon Sep 17 00:00:00 2001 From: Nicolai Haehnle Date: Sun, 16 Jun 2019 18:30:42 +0000 Subject: [PATCH] [AsmPrinter] Make EmitLinkage and EmitVisibility public Summary: This allows target to implement custom emit of global variables if required. See subsequent patch for a use case. Change-Id: I9654197e3df24503104a54c41fff06845aed37fe Reviewers: arsenm, kzhuravl Subscribers: wdng, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61650 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363519 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/AsmPrinter.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/llvm/CodeGen/AsmPrinter.h b/include/llvm/CodeGen/AsmPrinter.h index cebc5013d1d..59ebd15ce6c 100644 --- a/include/llvm/CodeGen/AsmPrinter.h +++ b/include/llvm/CodeGen/AsmPrinter.h @@ -620,6 +620,13 @@ public: virtual void emitInlineAsmEnd(const MCSubtargetInfo &StartInfo, const MCSubtargetInfo *EndInfo) const; + /// This emits visibility information about symbol, if this is supported by + /// the target. + void EmitVisibility(MCSymbol *Sym, unsigned Visibility, + bool IsDefinition = true) const; + + void EmitLinkage(const GlobalValue *GV, MCSymbol *GVSym) const; + private: /// Private state for PrintSpecial() // Assign a unique ID to this machine instruction. @@ -650,13 +657,6 @@ private: // Internal Implementation Details //===------------------------------------------------------------------===// - /// This emits visibility information about symbol, if this is supported by - /// the target. - void EmitVisibility(MCSymbol *Sym, unsigned Visibility, - bool IsDefinition = true) const; - - void EmitLinkage(const GlobalValue *GV, MCSymbol *GVSym) const; - void EmitJumpTableEntry(const MachineJumpTableInfo *MJTI, const MachineBasicBlock *MBB, unsigned uid) const; void EmitLLVMUsedList(const ConstantArray *InitList); -- 2.40.0