summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-c-test
diff options
context:
space:
mode:
authorSerge Pavlov <sepavloff@gmail.com>2018-02-15 09:45:59 +0000
committerSerge Pavlov <sepavloff@gmail.com>2018-02-15 09:45:59 +0000
commit4500001905805be5437cfe21e9f65820202c8966 (patch)
tree93ba69588b99c6008de5d6306d91c0a9ddf0feae /llvm/tools/llvm-c-test
parentce719a0def0054c03a9787ddb5a1e0235bbea103 (diff)
downloadbcm5719-llvm-4500001905805be5437cfe21e9f65820202c8966.tar.gz
bcm5719-llvm-4500001905805be5437cfe21e9f65820202c8966.zip
Revert r325224 "Report fatal error in the case of out of memory"
It caused fails on some buildbots. llvm-svn: 325227
Diffstat (limited to 'llvm/tools/llvm-c-test')
-rw-r--r--llvm/tools/llvm-c-test/attributes.c3
-rw-r--r--llvm/tools/llvm-c-test/echo.cpp3
2 files changed, 1 insertions, 5 deletions
diff --git a/llvm/tools/llvm-c-test/attributes.c b/llvm/tools/llvm-c-test/attributes.c
index c7bc0d3c87b..c6beab1d31b 100644
--- a/llvm/tools/llvm-c-test/attributes.c
+++ b/llvm/tools/llvm-c-test/attributes.c
@@ -14,7 +14,6 @@
#include "llvm-c-test.h"
-#include <assert.h>
#include <stdlib.h>
int llvm_test_function_attributes(void) {
@@ -31,7 +30,6 @@ 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);
}
@@ -63,7 +61,6 @@ 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);
}
diff --git a/llvm/tools/llvm-c-test/echo.cpp b/llvm/tools/llvm-c-test/echo.cpp
index b09a391499d..05d80363162 100644
--- a/llvm/tools/llvm-c-test/echo.cpp
+++ b/llvm/tools/llvm-c-test/echo.cpp
@@ -90,8 +90,7 @@ struct TypeCloner {
unsigned ParamCount = LLVMCountParamTypes(Src);
LLVMTypeRef* Params = nullptr;
if (ParamCount > 0) {
- Params = static_cast<LLVMTypeRef*>(
- llvm::malloc(ParamCount * sizeof(LLVMTypeRef)));
+ Params = (LLVMTypeRef*) malloc(ParamCount * sizeof(LLVMTypeRef));
LLVMGetParamTypes(Src, Params);
for (unsigned i = 0; i < ParamCount; i++)
Params[i] = Clone(Params[i]);
OpenPOWER on IntegriCloud