diff options
Diffstat (limited to 'llvm/include/llvm/IR/Function.h')
-rw-r--r-- | llvm/include/llvm/IR/Function.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm/include/llvm/IR/Function.h b/llvm/include/llvm/IR/Function.h index d586a9460d2b..d9cbcc63fa62 100644 --- a/llvm/include/llvm/IR/Function.h +++ b/llvm/include/llvm/IR/Function.h @@ -43,7 +43,7 @@ namespace llvm { namespace Intrinsic { -enum ID : unsigned; +typedef unsigned ID; } class AssemblyAnnotationWriter; @@ -435,12 +435,18 @@ public: void addDereferenceableOrNullParamAttr(unsigned ArgNo, uint64_t Bytes); /// Extract the alignment for a call or parameter (0=unknown). + /// FIXME: Remove this function once transition to Align is over. + /// Use getParamAlign() instead. unsigned getParamAlignment(unsigned ArgNo) const { - if (const auto MA = AttributeSets.getParamAlignment(ArgNo)) + if (const auto MA = getParamAlign(ArgNo)) return MA->value(); return 0; } + MaybeAlign getParamAlign(unsigned ArgNo) const { + return AttributeSets.getParamAlignment(ArgNo); + } + /// Extract the byval type for a parameter. Type *getParamByValType(unsigned ArgNo) const { Type *Ty = AttributeSets.getParamByValType(ArgNo); |