diff options
author | Charles Davis <cdavis@mines.edu> | 2010-10-25 15:37:09 +0000 |
---|---|---|
committer | Charles Davis <cdavis@mines.edu> | 2010-10-25 15:37:09 +0000 |
commit | 970bfcc7d8b9991430caa7ab33975617f3f4c40d (patch) | |
tree | 4d3a6ad9273bd06be457f993741ac2b9cc78fca3 /include/llvm/Attributes.h | |
parent | d8c5ec6aece5732c766bd7d773ff75976d364168 (diff) | |
download | external_llvm-970bfcc7d8b9991430caa7ab33975617f3f4c40d.zip external_llvm-970bfcc7d8b9991430caa7ab33975617f3f4c40d.tar.gz external_llvm-970bfcc7d8b9991430caa7ab33975617f3f4c40d.tar.bz2 |
Add a new 'hotpatch' attribute. This attribute will insert a two-byte no-op
instruction at the beginning of each function that has the attribute, allowing
the function to be easily hooked and/or patched.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117264 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Attributes.h')
-rw-r--r-- | include/llvm/Attributes.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/llvm/Attributes.h b/include/llvm/Attributes.h index 0325c89..da6188b 100644 --- a/include/llvm/Attributes.h +++ b/include/llvm/Attributes.h @@ -65,6 +65,8 @@ const Attributes StackAlignment = 7<<26; ///< Alignment of stack for ///of alignment with +1 bias ///0 means unaligned (different from ///alignstack(1)) +const Attributes Hotpatch = 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 @@ const Attributes ParameterOnly = ByVal | Nest | StructRet | NoCapture; /// 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 | + Hotpatch; /// @brief Parameter attributes that do not apply to vararg call arguments. const Attributes VarArgsIncompatible = StructRet; |