Skip to content

Commit

Permalink
[ExecutionEngine] Silence warnings about sprintf use in interpreter.
Browse files Browse the repository at this point in the history
We should review memory safety in the interpreter
(llvm/llvm-project#58086), but for now just silence
the warnings to reduce noise.

rdar://100555195
  • Loading branch information
lhames authored and akiramenai committed Aug 26, 2023
1 parent 153583d commit 8c17ea9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
Expand Up @@ -332,6 +332,10 @@ static GenericValue lle_X_abort(FunctionType *FT, ArrayRef<GenericValue> Args) {
return GenericValue();
}

// Silence warnings about sprintf. (See also
// https://github.com/llvm/llvm-project/issues/58086)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
// int sprintf(char *, const char *, ...) - a very rough implementation to make
// output useful.
static GenericValue lle_X_sprintf(FunctionType *FT,
Expand Down Expand Up @@ -413,6 +417,7 @@ static GenericValue lle_X_sprintf(FunctionType *FT,
}
return GV;
}
#pragma clang diagnostic pop

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

0 comments on commit 8c17ea9

Please sign in to comment.