From dc0dbe1f69391bb81a8357ee4dd90c203a99def0 Mon Sep 17 00:00:00 2001 From: Kevin Enderby Date: Tue, 10 Nov 2015 00:31:08 +0000 Subject: =?UTF-8?q?Fix=20llvm-nm(1)=20printing=20of=20llvm-bitcode=20files?= =?UTF-8?q?=20for=20-format=20darwin=20to=20match=20darwin=E2=80=99s=20nm(?= =?UTF-8?q?1).=20Also=20a=20small=20fix=20to=20match=20printing=20of=20Mac?= =?UTF-8?q?h-O=20objects=20with=20-format=20posix.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit llvm-svn: 252567 --- llvm/lib/Object/IRObjectFile.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'llvm/lib/Object/IRObjectFile.cpp') diff --git a/llvm/lib/Object/IRObjectFile.cpp b/llvm/lib/Object/IRObjectFile.cpp index 9f5132e..dcd385a 100644 --- a/llvm/lib/Object/IRObjectFile.cpp +++ b/llvm/lib/Object/IRObjectFile.cpp @@ -219,6 +219,12 @@ uint32_t IRObjectFile::getSymbolFlags(DataRefImpl Symb) const { uint32_t Res = BasicSymbolRef::SF_None; if (GV->isDeclarationForLinker()) Res |= BasicSymbolRef::SF_Undefined; + else if (GV->hasHiddenVisibility() && !GV->hasLocalLinkage()) + Res |= BasicSymbolRef::SF_Hidden; + if (const GlobalVariable *GVar = dyn_cast(GV)) { + if (GVar->isConstant()) + Res |= BasicSymbolRef::SF_Const; + } if (GV->hasPrivateLinkage()) Res |= BasicSymbolRef::SF_FormatSpecific; if (!GV->hasLocalLinkage()) -- cgit v1.1