diff options
| author | Duncan Sands <baldrick@free.fr> | 2008-01-14 19:52:09 +0000 |
|---|---|---|
| committer | Duncan Sands <baldrick@free.fr> | 2008-01-14 19:52:09 +0000 |
| commit | b0c9b93bb4c591b1cec0491eec34f792cd3cf111 (patch) | |
| tree | 66cc20891cd0d42c7dc5913ded9f50d623af70b2 /include/llvm/ParameterAttributes.h | |
| parent | 459525df1e003597077197b5f802bd5d9cd7d94c (diff) | |
| download | external_llvm-b0c9b93bb4c591b1cec0491eec34f792cd3cf111.zip external_llvm-b0c9b93bb4c591b1cec0491eec34f792cd3cf111.tar.gz external_llvm-b0c9b93bb4c591b1cec0491eec34f792cd3cf111.tar.bz2 | |
I noticed that the trampoline straightening transformation could
drop attributes on varargs call arguments. Also, it could generate
invalid IR if the transformed call already had the 'nest' attribute
somewhere (this can never happen for code coming from llvm-gcc,
but it's a theoretical possibility). Fix both problems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45973 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ParameterAttributes.h')
| -rw-r--r-- | include/llvm/ParameterAttributes.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/llvm/ParameterAttributes.h b/include/llvm/ParameterAttributes.h index ded847e..31f9eb4 100644 --- a/include/llvm/ParameterAttributes.h +++ b/include/llvm/ParameterAttributes.h @@ -53,7 +53,7 @@ const uint16_t ParameterOnly = ByVal | InReg | Nest | StructRet; const uint16_t ReturnOnly = NoReturn | NoUnwind | ReadNone | ReadOnly; /// @brief Parameter attributes that do not apply to vararg call arguments. -const uint16_t VarArgsIncompatible = Nest | StructRet; +const uint16_t VarArgsIncompatible = StructRet; /// @brief Attributes that are mutually incompatible. const uint16_t MutuallyIncompatible[3] = { @@ -171,6 +171,12 @@ class ParamAttrsList : public FoldingSetNode { return getParamAttrs(i) & attr; } + /// This returns whether the given attribute is set for at least one + /// parameter or for the return value. + /// @returns true if the parameter attribute is set somewhere + /// @brief Determine if a ParameterAttributes is set somewhere + bool hasAttrSomewhere(ParameterAttributes attr) const; + /// The set of ParameterAttributes set in Attributes is converted to a /// string of equivalent mnemonics. This is, presumably, for writing out /// the mnemonics for the assembly writer. |
