Index: include/llvm/Attributes.h
===================================================================
--- include/llvm/Attributes.h	(revision 117250)
+++ include/llvm/Attributes.h	(working copy)
@@ -65,6 +65,8 @@
                                           ///of alignment with +1 bias
                                           ///0 means unaligned (different from
                                           ///alignstack(1))
+const Attributes HookPrologue    = 1<<29; ///< Function should have special
+                                          ///'hotpatch' sequence in prologue
 
 /// @brief Attributes that only apply to function parameters.
 const Attributes ParameterOnly = ByVal | Nest | StructRet | NoCapture;
@@ -73,7 +75,8 @@
 /// be used on return values or function parameters.
 const Attributes FunctionOnly = NoReturn | NoUnwind | ReadNone | ReadOnly |
   NoInline | AlwaysInline | OptimizeForSize | StackProtect | StackProtectReq |
-  NoRedZone | NoImplicitFloat | Naked | InlineHint | StackAlignment;
+  NoRedZone | NoImplicitFloat | Naked | InlineHint | StackAlignment |
+  HookPrologue;
 
 /// @brief Parameter attributes that do not apply to vararg call arguments.
 const Attributes VarArgsIncompatible = StructRet;
Index: docs/LangRef.html
===================================================================
--- docs/LangRef.html	(revision 117250)
+++ docs/LangRef.html	(working copy)
@@ -1131,6 +1131,11 @@
       function into callers whenever possible, ignoring any active inlining size
       threshold for this caller.</dd>
 
+  <dt><tt><b>hookprologue</b></tt></dt>
+  <dd>This attribute indicates that the prologue should contain a 'hotpatch'
+      sequence at the beginning. This is the same sequence used in the
+      system DLLs in Microsoft Windows XP Service Pack 2 and higher.</dd>
+
   <dt><tt><b>inlinehint</b></tt></dt>
   <dd>This attribute indicates that the source code contained a hint that inlining
       this function is desirable (such as the "inline" keyword in C/C++).  It
Index: lib/VMCore/Attributes.cpp
===================================================================
--- lib/VMCore/Attributes.cpp	(revision 117250)
+++ lib/VMCore/Attributes.cpp	(working copy)
@@ -70,6 +70,8 @@
     Result += "noimplicitfloat ";
   if (Attrs & Attribute::Naked)
     Result += "naked ";
+  if (Attrs & Attribute::HookPrologue)
+    Result += "hookprologue ";
   if (Attrs & Attribute::StackAlignment) {
     Result += "alignstack(";
     Result += utostr(Attribute::getStackAlignmentFromAttrs(Attrs));
Index: lib/AsmParser/LLParser.cpp
===================================================================
--- lib/AsmParser/LLParser.cpp	(revision 117250)
+++ lib/AsmParser/LLParser.cpp	(working copy)
@@ -982,6 +982,7 @@
     case lltok::kw_noredzone:       Attrs |= Attribute::NoRedZone; break;
     case lltok::kw_noimplicitfloat: Attrs |= Attribute::NoImplicitFloat; break;
     case lltok::kw_naked:           Attrs |= Attribute::Naked; break;
+    case lltok::kw_hookprologue:    Attrs |= Attribute::HookPrologue;
 
     case lltok::kw_alignstack: {
       unsigned Alignment;
Index: lib/AsmParser/LLLexer.cpp
===================================================================
--- lib/AsmParser/LLLexer.cpp	(revision 117250)
+++ lib/AsmParser/LLLexer.cpp	(working copy)
@@ -573,6 +573,7 @@
   KEYWORD(noredzone);
   KEYWORD(noimplicitfloat);
   KEYWORD(naked);
+  KEYWORD(hookprologue);
 
   KEYWORD(type);
   KEYWORD(opaque);
Index: lib/AsmParser/LLToken.h
===================================================================
--- lib/AsmParser/LLToken.h	(revision 117250)
+++ lib/AsmParser/LLToken.h	(working copy)
@@ -96,6 +96,7 @@
     kw_noredzone,
     kw_noimplicitfloat,
     kw_naked,
+    kw_hookprologue,
 
     kw_type,
     kw_opaque,
