diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2007-04-29 18:35:00 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2007-04-29 18:35:00 +0000 |
commit | 6f9896fcc81a1128b5f436d1763cc6213745adf1 (patch) | |
tree | 89f99df6a320347cd98adf490edeea24432c86f6 /lib/Bytecode/Writer/Writer.cpp | |
parent | c6c98af9e5814e8066c82f20ca11cf646a5fc289 (diff) |
Implement protected visibility. This partly implements PR1363. Linker
should be taught to deal with protected symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36565 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode/Writer/Writer.cpp')
-rw-r--r-- | lib/Bytecode/Writer/Writer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Bytecode/Writer/Writer.cpp b/lib/Bytecode/Writer/Writer.cpp index f1c6f6c561..b4a2691600 100644 --- a/lib/Bytecode/Writer/Writer.cpp +++ b/lib/Bytecode/Writer/Writer.cpp @@ -957,8 +957,9 @@ static unsigned getEncodedLinkage(const GlobalValue *GV) { static unsigned getEncodedVisibility(const GlobalValue *GV) { switch (GV->getVisibility()) { default: assert(0 && "Invalid visibility!"); - case GlobalValue::DefaultVisibility: return 0; - case GlobalValue::HiddenVisibility: return 1; + case GlobalValue::DefaultVisibility: return 0; + case GlobalValue::HiddenVisibility: return 1; + case GlobalValue::ProtectedVisibility: return 2; } } |