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/AsmParser | |
parent | c6c98af9e5814e8066c82f20ca11cf646a5fc289 (diff) | |
download | external_llvm-6f9896fcc81a1128b5f436d1763cc6213745adf1.zip external_llvm-6f9896fcc81a1128b5f436d1763cc6213745adf1.tar.gz external_llvm-6f9896fcc81a1128b5f436d1763cc6213745adf1.tar.bz2 |
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/AsmParser')
-rw-r--r-- | lib/AsmParser/Lexer.l | 1 | ||||
-rw-r--r-- | lib/AsmParser/Lexer.l.cvs | 1 | ||||
-rw-r--r-- | lib/AsmParser/llvmAsmParser.y | 9 | ||||
-rw-r--r-- | lib/AsmParser/llvmAsmParser.y.cvs | 9 |
4 files changed, 12 insertions, 8 deletions
diff --git a/lib/AsmParser/Lexer.l b/lib/AsmParser/Lexer.l index 382ce24..b67f6ff 100644 --- a/lib/AsmParser/Lexer.l +++ b/lib/AsmParser/Lexer.l @@ -206,6 +206,7 @@ appending { return APPENDING; } dllimport { return DLLIMPORT; } dllexport { return DLLEXPORT; } hidden { return HIDDEN; } +protected { return PROTECTED; } extern_weak { return EXTERN_WEAK; } external { return EXTERNAL; } thread_local { return THREAD_LOCAL; } diff --git a/lib/AsmParser/Lexer.l.cvs b/lib/AsmParser/Lexer.l.cvs index 382ce24..b67f6ff 100644 --- a/lib/AsmParser/Lexer.l.cvs +++ b/lib/AsmParser/Lexer.l.cvs @@ -206,6 +206,7 @@ appending { return APPENDING; } dllimport { return DLLIMPORT; } dllexport { return DLLEXPORT; } hidden { return HIDDEN; } +protected { return PROTECTED; } extern_weak { return EXTERN_WEAK; } external { return EXTERNAL; } thread_local { return THREAD_LOCAL; } diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index c47b6fc..63f2261 100644 --- a/lib/AsmParser/llvmAsmParser.y +++ b/lib/AsmParser/llvmAsmParser.y @@ -1099,7 +1099,7 @@ Module *llvm::RunVMAsmParser(const char * AsmString, Module * M) { %token NORETURN INREG SRET NOUNWIND // Visibility Styles -%token DEFAULT HIDDEN +%token DEFAULT HIDDEN PROTECTED %start Module %% @@ -1180,9 +1180,10 @@ GVExternalLinkage ; GVVisibilityStyle - : /*empty*/ { $$ = GlobalValue::DefaultVisibility; } - | DEFAULT { $$ = GlobalValue::DefaultVisibility; } - | HIDDEN { $$ = GlobalValue::HiddenVisibility; } + : /*empty*/ { $$ = GlobalValue::DefaultVisibility; } + | DEFAULT { $$ = GlobalValue::DefaultVisibility; } + | HIDDEN { $$ = GlobalValue::HiddenVisibility; } + | PROTECTED { $$ = GlobalValue::ProtectedVisibility; } ; FunctionDeclareLinkage diff --git a/lib/AsmParser/llvmAsmParser.y.cvs b/lib/AsmParser/llvmAsmParser.y.cvs index c47b6fc..63f2261 100644 --- a/lib/AsmParser/llvmAsmParser.y.cvs +++ b/lib/AsmParser/llvmAsmParser.y.cvs @@ -1099,7 +1099,7 @@ Module *llvm::RunVMAsmParser(const char * AsmString, Module * M) { %token NORETURN INREG SRET NOUNWIND // Visibility Styles -%token DEFAULT HIDDEN +%token DEFAULT HIDDEN PROTECTED %start Module %% @@ -1180,9 +1180,10 @@ GVExternalLinkage ; GVVisibilityStyle - : /*empty*/ { $$ = GlobalValue::DefaultVisibility; } - | DEFAULT { $$ = GlobalValue::DefaultVisibility; } - | HIDDEN { $$ = GlobalValue::HiddenVisibility; } + : /*empty*/ { $$ = GlobalValue::DefaultVisibility; } + | DEFAULT { $$ = GlobalValue::DefaultVisibility; } + | HIDDEN { $$ = GlobalValue::HiddenVisibility; } + | PROTECTED { $$ = GlobalValue::ProtectedVisibility; } ; FunctionDeclareLinkage |