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
This commit is contained in:
Anton Korobeynikov
2007-04-29 18:35:00 +00:00
parent c6c98af9e5
commit 6f9896fcc8
14 changed files with 57 additions and 18 deletions

View File

@@ -1532,6 +1532,7 @@ void BytecodeReader::ParseFunctionBody(Function* F) {
switch (VisibilityID) {
case 0: Visibility = GlobalValue::DefaultVisibility; break;
case 1: Visibility = GlobalValue::HiddenVisibility; break;
case 2: Visibility = GlobalValue::ProtectedVisibility; break;
default:
error("Unknown visibility type: " + utostr(VisibilityID));
Visibility = GlobalValue::DefaultVisibility;
@@ -1767,6 +1768,7 @@ void BytecodeReader::ParseModuleGlobalInfo() {
switch (VisibilityID) {
case 0: Visibility = GlobalValue::DefaultVisibility; break;
case 1: Visibility = GlobalValue::HiddenVisibility; break;
case 2: Visibility = GlobalValue::ProtectedVisibility; break;
default:
error("Unknown visibility type: " + utostr(VisibilityID));
Visibility = GlobalValue::DefaultVisibility;