Skip to content

Commit 0963833

Browse files
committed
[ExecutionEngine] Silence warnings about sprintf use in interpreter.
We should review memory safety in the interpreter (llvm/llvm-project#58086), but for now just silence the warnings to reduce noise. rdar://100555195
1 parent 38d16f5 commit 0963833

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,10 @@ static GenericValue lle_X_abort(FunctionType *FT, ArrayRef<GenericValue> Args) {
344344
return GenericValue();
345345
}
346346

347+
// Silence warnings about sprintf. (See also
348+
// https://github.com/llvm/llvm-project/issues/58086)
349+
#pragma clang diagnostic push
350+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
347351
// int sprintf(char *, const char *, ...) - a very rough implementation to make
348352
// output useful.
349353
static GenericValue lle_X_sprintf(FunctionType *FT,
@@ -425,6 +429,7 @@ static GenericValue lle_X_sprintf(FunctionType *FT,
425429
}
426430
return GV;
427431
}
432+
#pragma clang diagnostic pop
428433

429434
// int printf(const char *, ...) - a very rough implementation to make output
430435
// useful.

0 commit comments

Comments
 (0)