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 | 39f3cffbe38701ca69890baf4fa22d8a7abf2da1 (patch) | |
tree | c63895bd098915fb0b9574cfdeb2de8386fb902d /llvm/lib/Bytecode/Writer | |
parent | 546ea7ea88965166e6d756c2012ede522bf12682 (diff) | |
download | bcm5719-llvm-39f3cffbe38701ca69890baf4fa22d8a7abf2da1.tar.gz bcm5719-llvm-39f3cffbe38701ca69890baf4fa22d8a7abf2da1.zip |
Implement protected visibility. This partly implements PR1363. Linker
should be taught to deal with protected symbols.
llvm-svn: 36565
Diffstat (limited to 'llvm/lib/Bytecode/Writer')
-rw-r--r-- | llvm/lib/Bytecode/Writer/Writer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Bytecode/Writer/Writer.cpp b/llvm/lib/Bytecode/Writer/Writer.cpp index f1c6f6c5619..b4a26916008 100644 --- a/llvm/lib/Bytecode/Writer/Writer.cpp +++ b/llvm/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; } } |