diff --git a/lib/Parse/ParsePragma.cpp b/lib/Parse/ParsePragma.cpp
index 94695e4..58c729a 100644
--- a/lib/Parse/ParsePragma.cpp
+++ b/lib/Parse/ParsePragma.cpp
@@ -100,6 +100,12 @@
     return;
   }
 
+  PP.Lex(Tok);
+  if (Tok.isNot(tok::eom)) {
+    PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << "pack";
+    return;
+  }
+
   SourceLocation RParenLoc = Tok.getLocation();
   Actions.ActOnPragmaPack(Kind, Name, Alignment.release(), PackLoc,
                           LParenLoc, RParenLoc);
@@ -172,7 +178,14 @@
     PP.Diag(Tok.getLocation(), diag::warn_pragma_unused_expected_punc);
     return;
   }
-  
+
+  PP.Lex(Tok);
+  if (Tok.isNot(tok::eom)) {
+    PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) <<
+        "unused";
+    return;
+  }
+
   // Verify that we have a location for the right parenthesis.
   assert(RParenLoc.isValid() && "Valid '#pragma unused' must have ')'");
   assert(!Ex.empty() && "Valid '#pragma unused' must have arguments");
@@ -180,3 +193,45 @@
   // Perform the action to handle the pragma.    
   Actions.ActOnPragmaUnused(&Ex[0], Ex.size(), UnusedLoc, LParenLoc, RParenLoc);
 }
+
+// #pragma weak identifier
+// #pragma weak identifier '=' identifier
+void PragmaWeakHandler::HandlePragma(Preprocessor &PP, Token &WeakTok) {
+  // FIXME: Should we be expanding macros here? My guess is no.
+  SourceLocation WeakLoc = WeakTok.getLocation();
+
+  Token Tok;
+  PP.Lex(Tok);
+  if (Tok.isNot(tok::identifier)) {
+    PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_identifier) << "weak";
+    return;
+  }
+
+  IdentifierInfo *WeakName = Tok.getIdentifierInfo(), *AliasName = 0;
+  SourceLocation WeakNameLoc = Tok.getLocation(), AliasNameLoc;
+
+  PP.Lex(Tok);
+  if (Tok.is(tok::equal)) {
+    PP.Lex(Tok);
+    if (Tok.isNot(tok::identifier)) {
+      PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_identifier) 
+          << "weak";
+      return;
+    }
+    AliasName = Tok.getIdentifierInfo();
+    AliasNameLoc = Tok.getLocation();
+    PP.Lex(Tok);
+  }
+
+  if (Tok.isNot(tok::eom)) {
+    PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << "weak";
+    return;
+  }
+
+  if (AliasName) {
+    Actions.ActOnPragmaWeakAlias(WeakName, AliasName, WeakLoc, WeakNameLoc,
+                                 AliasNameLoc);
+  } else {
+    Actions.ActOnPragmaWeakID(WeakName, WeakLoc, WeakNameLoc);
+  }
+}
diff --git a/lib/Parse/ParsePragma.h b/lib/Parse/ParsePragma.h
index 31b2a5f..39c86ee 100644
--- a/lib/Parse/ParsePragma.h
+++ b/lib/Parse/ParsePragma.h
@@ -39,6 +39,15 @@
   virtual void HandlePragma(Preprocessor &PP, Token &FirstToken);  
 };  
 
+class PragmaWeakHandler : public PragmaHandler {
+  Action &Actions;
+public:
+  PragmaWeakHandler(const IdentifierInfo *N, Action &A)
+    : PragmaHandler(N), Actions(A) {}
+  
+  virtual void HandlePragma(Preprocessor &PP, Token &FirstToken);  
+};
+
 }  // end namespace clang
 
 #endif
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp
index 1c2e8a6..a2a66f9 100644
--- a/lib/Parse/Parser.cpp
+++ b/lib/Parse/Parser.cpp
@@ -39,6 +39,10 @@
           PragmaUnusedHandler(&PP.getIdentifierTable().get("unused"), actions,
                               *this));
   PP.AddPragmaHandler(0, UnusedHandler.get());
+
+  WeakHandler.reset(new
+          PragmaWeakHandler(&PP.getIdentifierTable().get("weak"), actions));
+  PP.AddPragmaHandler(0, WeakHandler.get());
 }
 
 /// If a crash happens while the parser is active, print out a line indicating
@@ -288,6 +292,8 @@
   PackHandler.reset();
   PP.RemovePragmaHandler(0, UnusedHandler.get());
   UnusedHandler.reset();
+  PP.RemovePragmaHandler(0, WeakHandler.get());
+  WeakHandler.reset();
 }
 
 /// Initialize - Warm up the parser.
