diff options
Diffstat (limited to 'include/llvm/Target/TargetCallingConv.h')
-rw-r--r-- | include/llvm/Target/TargetCallingConv.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/include/llvm/Target/TargetCallingConv.h b/include/llvm/Target/TargetCallingConv.h index 0c6c1f1468c43..19d8917f17d3f 100644 --- a/include/llvm/Target/TargetCallingConv.h +++ b/include/llvm/Target/TargetCallingConv.h @@ -17,8 +17,7 @@ #include "llvm/CodeGen/ValueTypes.h" #include "llvm/Support/DataTypes.h" #include "llvm/Support/MathExtras.h" -#include <string> -#include <limits.h> +#include <climits> namespace llvm { @@ -48,6 +47,10 @@ namespace ISD { static const uint64_t InAllocaOffs = 12; static const uint64_t SplitEnd = 1ULL<<13; ///< Last part of a split static const uint64_t SplitEndOffs = 13; + static const uint64_t SwiftSelf = 1ULL<<14; ///< Swift self parameter + static const uint64_t SwiftSelfOffs = 14; + static const uint64_t SwiftError = 1ULL<<15; ///< Swift error parameter + static const uint64_t SwiftErrorOffs = 15; static const uint64_t OrigAlign = 0x1FULL<<27; static const uint64_t OrigAlignOffs = 27; static const uint64_t ByValSize = 0x3fffffffULL<<32; ///< Struct size @@ -60,6 +63,7 @@ namespace ISD { static const uint64_t One = 1ULL; ///< 1 of this type, for shifts uint64_t Flags; + public: ArgFlagsTy() : Flags(0) { } @@ -81,6 +85,12 @@ namespace ISD { bool isInAlloca() const { return Flags & InAlloca; } void setInAlloca() { Flags |= One << InAllocaOffs; } + bool isSwiftSelf() const { return Flags & SwiftSelf; } + void setSwiftSelf() { Flags |= One << SwiftSelfOffs; } + + bool isSwiftError() const { return Flags & SwiftError; } + void setSwiftError() { Flags |= One << SwiftErrorOffs; } + bool isNest() const { return Flags & Nest; } void setNest() { Flags |= One << NestOffs; } @@ -195,8 +205,8 @@ namespace ISD { ArgVT = argvt; } }; -} +} // end namespace ISD } // end llvm namespace -#endif +#endif // LLVM_TARGET_TARGETCALLINGCONV_H |