summaryrefslogtreecommitdiffstats
path: root/include/llvm/ParameterAttributes.h
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2008-01-11 22:36:48 +0000
committerDuncan Sands <baldrick@free.fr>2008-01-11 22:36:48 +0000
commit623a389f623dfef44f07211bd12fbd2a93db09e3 (patch)
treefdaeaea0d3864dad9983412fe9f31d2c57912c81 /include/llvm/ParameterAttributes.h
parent10603e0c84d15f61443e8b17bc35f98cc46606d9 (diff)
downloadexternal_llvm-623a389f623dfef44f07211bd12fbd2a93db09e3.zip
external_llvm-623a389f623dfef44f07211bd12fbd2a93db09e3.tar.gz
external_llvm-623a389f623dfef44f07211bd12fbd2a93db09e3.tar.bz2
Do not allow attributes beyond a function's last
parameter, even if it is a varargs function. Do allow attributes on the varargs part of a call, but not beyond the last argument. Only allow selected attributes to be on the varargs part of a call (currently only 'byval' is allowed). The reasoning here is that most attributes, eg inreg, simply make no sense here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45887 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ParameterAttributes.h')
-rw-r--r--include/llvm/ParameterAttributes.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/ParameterAttributes.h b/include/llvm/ParameterAttributes.h
index 0d138fe..4106dcb 100644
--- a/include/llvm/ParameterAttributes.h
+++ b/include/llvm/ParameterAttributes.h
@@ -52,6 +52,9 @@ const uint16_t ParameterOnly = ByVal | InReg | Nest | StructRet;
/// @brief Attributes that only apply to function return values.
const uint16_t ReturnOnly = NoReturn | NoUnwind | ReadNone | ReadOnly;
+/// @brief Attributes that can apply to vararg call arguments.
+const uint16_t VarArgsCompatible = ByVal;
+
/// @brief Attributes that are mutually incompatible.
const uint16_t MutuallyIncompatible[3] = {
ByVal | InReg | Nest | StructRet,