]> granicus.if.org Git - llvm/commitdiff
[AsmPrinter] Make EmitLinkage and EmitVisibility public
authorNicolai Haehnle <nhaehnle@gmail.com>
Sun, 16 Jun 2019 18:30:42 +0000 (18:30 +0000)
committerNicolai Haehnle <nhaehnle@gmail.com>
Sun, 16 Jun 2019 18:30:42 +0000 (18:30 +0000)
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

index cebc5013d1db195a420298dea4eff2ea4a6e7c7b..59ebd15ce6c42dbc4346373bc9345a1e11fdbe5b 100644 (file)
@@ -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);