mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
Add 'nonnull', a new parameter and return attribute which indicates that the pointer is not null. Instcombine will elide comparisons between these and null. Patch by Luqman Aden!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209185 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -55,6 +55,10 @@ public:
|
||||
/// For example in "void foo(int a, float b)" a is 0 and b is 1.
|
||||
unsigned getArgNo() const;
|
||||
|
||||
/// \brief Return true if this argument has the nonnull attribute on it in
|
||||
/// its containing function.
|
||||
bool hasNonNullAttr() const;
|
||||
|
||||
/// \brief Return true if this argument has the byval attribute on it in its
|
||||
/// containing function.
|
||||
bool hasByValAttr() const;
|
||||
|
||||
@@ -86,6 +86,7 @@ public:
|
||||
NoInline, ///< inline=never
|
||||
NonLazyBind, ///< Function is called early and/or
|
||||
///< often, so lazy binding isn't worthwhile
|
||||
NonNull, ///< Pointer is known to be not null
|
||||
NoRedZone, ///< Disable redzone
|
||||
NoReturn, ///< Mark the function as not returning
|
||||
NoUnwind, ///< Function doesn't unwind stack
|
||||
|
||||
Reference in New Issue
Block a user