summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-c-test/echo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-c-test/echo.cpp')
-rw-r--r--llvm/tools/llvm-c-test/echo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/llvm-c-test/echo.cpp b/llvm/tools/llvm-c-test/echo.cpp
index 05d80363162..b09a391499d 100644
--- a/llvm/tools/llvm-c-test/echo.cpp
+++ b/llvm/tools/llvm-c-test/echo.cpp
@@ -90,7 +90,8 @@ struct TypeCloner {
unsigned ParamCount = LLVMCountParamTypes(Src);
LLVMTypeRef* Params = nullptr;
if (ParamCount > 0) {
- Params = (LLVMTypeRef*) malloc(ParamCount * sizeof(LLVMTypeRef));
+ Params = static_cast<LLVMTypeRef*>(
+ llvm::malloc(ParamCount * sizeof(LLVMTypeRef)));
LLVMGetParamTypes(Src, Params);
for (unsigned i = 0; i < ParamCount; i++)
Params[i] = Clone(Params[i]);
OpenPOWER on IntegriCloud