Accept 'weak' as a linkage type. For now, just turn it into linkonce linkage

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8998 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-10-10 04:54:02 +00:00
parent 83bb2565c6
commit f797cabedf
2 changed files with 3 additions and 1 deletions

View File

@ -170,6 +170,7 @@ constant { return CONSTANT; }
const { return CONST; }
internal { return INTERNAL; }
linkonce { return LINKONCE; }
weak { return WEAK; }
appending { return APPENDING; }
uninitialized { return EXTERNAL; } /* Deprecated, turn into external */
external { return EXTERNAL; }

View File

@ -697,7 +697,7 @@ Module *RunVMAsmParser(const std::string &Filename, FILE *F) {
%token IMPLEMENTATION ZEROINITIALIZER TRUE FALSE BEGINTOK ENDTOK
%token DECLARE GLOBAL CONSTANT VOLATILE
%token TO EXCEPT DOTDOTDOT NULL_TOK CONST INTERNAL LINKONCE APPENDING
%token TO EXCEPT DOTDOTDOT NULL_TOK CONST INTERNAL LINKONCE WEAK APPENDING
%token OPAQUE NOT EXTERNAL TARGET ENDIAN POINTERSIZE LITTLE BIG
// Basic Block Terminating Operators
@ -763,6 +763,7 @@ OptAssign : Name '=' {
OptLinkage : INTERNAL { $$ = GlobalValue::InternalLinkage; } |
LINKONCE { $$ = GlobalValue::LinkOnceLinkage; } |
WEAK { $$ = GlobalValue::LinkOnceLinkage; /* FIXME */ } |
APPENDING { $$ = GlobalValue::AppendingLinkage; } |
/*empty*/ { $$ = GlobalValue::ExternalLinkage; };