diff options
Diffstat (limited to 'llvm/tools/llvm-c-test/attributes.c')
-rw-r--r-- | llvm/tools/llvm-c-test/attributes.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/tools/llvm-c-test/attributes.c b/llvm/tools/llvm-c-test/attributes.c index c6beab1d31b..c7bc0d3c87b 100644 --- a/llvm/tools/llvm-c-test/attributes.c +++ b/llvm/tools/llvm-c-test/attributes.c @@ -14,6 +14,7 @@ #include "llvm-c-test.h" +#include <assert.h> #include <stdlib.h> int llvm_test_function_attributes(void) { @@ -30,6 +31,7 @@ int llvm_test_function_attributes(void) { int AttrCount = LLVMGetAttributeCountAtIndex(F, Idx); LLVMAttributeRef *Attrs = (LLVMAttributeRef *)malloc(AttrCount * sizeof(LLVMAttributeRef)); + assert(Attrs); LLVMGetAttributesAtIndex(F, Idx, Attrs); free(Attrs); } @@ -61,6 +63,7 @@ int llvm_test_callsite_attributes(void) { int AttrCount = LLVMGetCallSiteAttributeCount(I, Idx); LLVMAttributeRef *Attrs = (LLVMAttributeRef *)malloc( AttrCount * sizeof(LLVMAttributeRef)); + assert(Attrs); LLVMGetCallSiteAttributes(I, Idx, Attrs); free(Attrs); } |