aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/AsmParser/Lexer.l1
-rw-r--r--lib/AsmParser/llvmAsmParser.y3
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/AsmParser/Lexer.l b/lib/AsmParser/Lexer.l
index 6e69262..0a9d2c3 100644
--- a/lib/AsmParser/Lexer.l
+++ b/lib/AsmParser/Lexer.l
@@ -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; }
diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y
index 4543fcd..dcfb943 100644
--- a/lib/AsmParser/llvmAsmParser.y
+++ b/lib/AsmParser/llvmAsmParser.y
@@ -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; };