summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic/Attr.td
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2016-07-13 22:32:15 +0000
committerAaron Ballman <aaron@aaronballman.com>2016-07-13 22:32:15 +0000
commitd1642265a78e95e9050fbd574554a7f53ae0c649 (patch)
tree9ccae9b269ffea1616239692c678c2d3fc64b780 /include/clang/Basic/Attr.td
parent1ae6e480095d887215db836932c651e0f8f748dc (diff)
Add XRay flags to Clang. We implement two flags to control the XRay behaviour:
-fxray-instrument: enables XRay annotation of IR -fxray-instruction-threshold: configures the threshold for function size (looking at IR instructions), and allow LLVM to decide whether to add the nop sleds later on in the process. Also implements the related xray_always_instrument and xray_never_instrument function attributes. Patch by Dean Michael Berris. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275330 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/Attr.td')
-rw-r--r--include/clang/Basic/Attr.td16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/clang/Basic/Attr.td b/include/clang/Basic/Attr.td
index 51903cbf92..7305c746ce 100644
--- a/include/clang/Basic/Attr.td
+++ b/include/clang/Basic/Attr.td
@@ -428,6 +428,22 @@ def AlwaysInline : InheritableAttr {
let Documentation = [Undocumented];
}
+def XRayInstrument : InheritableAttr {
+ let Spellings = [GNU<"xray_always_instrument">,
+ CXX11<"clang", "xray_always_instrument">,
+ GNU<"xray_never_instrument">,
+ CXX11<"clang", "xray_never_instrument">];
+ let Subjects = SubjectList<[CXXMethod, ObjCMethod, Function], WarnDiag,
+ "ExpectedFunctionOrMethod">;
+ let Accessors = [Accessor<"alwaysXRayInstrument",
+ [GNU<"xray_always_instrument">,
+ CXX11<"clang", "xray_always_instrument">]>,
+ Accessor<"neverXRayInstrument",
+ [GNU<"xray_never_instrument">,
+ CXX11<"clang", "xray_never_instrument">]>];
+ let Documentation = [XRayDocs];
+}
+
def TLSModel : InheritableAttr {
let Spellings = [GCC<"tls_model">];
let Subjects = SubjectList<[TLSVar], ErrorDiag, "ExpectedTLSVar">;