aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCStreamer.cpp
diff options
context:
space:
mode:
authordiggerlin <digger.llvm@gmail.com>2020-06-09 16:15:06 -0400
committerdiggerlin <digger.llvm@gmail.com>2020-06-09 16:15:06 -0400
commitedd819c7576b5183f0d9ef90c48bf903e22035d0 (patch)
tree9b17295b08570fb627e9db72078c9c98236cbbef /llvm/lib/MC/MCStreamer.cpp
parente6d94f4bd210f01a6dedf3cdd9ac331815cc7874 (diff)
downloadllvm-edd819c7576b5183f0d9ef90c48bf903e22035d0.zip
llvm-edd819c7576b5183f0d9ef90c48bf903e22035d0.tar.gz
llvm-edd819c7576b5183f0d9ef90c48bf903e22035d0.tar.bz2
[AIX] supporting the visibility attribute for aix assembly
SUMMARY: in the aix assembly , it do not have .hidden and .protected directive. in current llvm. if a function or a variable which has visibility attribute, it will generate something like the .hidden or .protected , it can not recognize by aix as. in aix assembly, the visibility attribute are support in the pseudo-op like .extern Name [ , Visibility ] .globl Name [, Visibility ] .weak Name [, Visibility ] in this patch, we implement the visibility attribute for the global variable, function or extern function . for example. extern __attribute__ ((visibility ("hidden"))) int bar(int* ip); __attribute__ ((visibility ("hidden"))) int b = 0; __attribute__ ((visibility ("hidden"))) int foo(int* ip){ return (*ip)++; } the visibility of .comm linkage do not support , we will have a separate patch for it. we have the unsupported cases ("default" and "internal") , we will implement them in a a separate patch for it. Reviewers: Jason Liu ,hubert.reinterpretcast,James Henderson Differential Revision: https://reviews.llvm.org/D75866
Diffstat (limited to 'llvm/lib/MC/MCStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCStreamer.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp
index be5d588..0b650ef 100644
--- a/llvm/lib/MC/MCStreamer.cpp
+++ b/llvm/lib/MC/MCStreamer.cpp
@@ -1063,6 +1063,14 @@ void MCStreamer::emitXCOFFLocalCommonSymbol(MCSymbol *LabelSym, uint64_t Size,
unsigned ByteAlign) {
llvm_unreachable("this directive only supported on XCOFF targets");
}
+
+void MCStreamer::emitXCOFFSymbolLinkageWithVisibility(MCSymbol *Symbol,
+ MCSymbolAttr Linkage,
+ MCSymbolAttr Visibility) {
+ llvm_unreachable("emitXCOFFSymbolLinkageWithVisibility is only supported on "
+ "XCOFF targets");
+}
+
void MCStreamer::emitELFSize(MCSymbol *Symbol, const MCExpr *Value) {}
void MCStreamer::emitELFSymverDirective(StringRef AliasName,
const MCSymbol *Aliasee) {}