[llvm] 8c847e5 - ExternalFunctions.cpp - fix "unknown pragma 'clang'" MSVC warning. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 6 03:02:00 PST 2023
Author: Simon Pilgrim
Date: 2023-03-06T11:01:45Z
New Revision: 8c847e58b3a5a7655e20da49b54d483206e3cd29
URL: https://github.com/llvm/llvm-project/commit/8c847e58b3a5a7655e20da49b54d483206e3cd29
DIFF: https://github.com/llvm/llvm-project/commit/8c847e58b3a5a7655e20da49b54d483206e3cd29.diff
LOG: ExternalFunctions.cpp - fix "unknown pragma 'clang'" MSVC warning. NFCI.
Added:
Modified:
llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
index 73b1023fffac1..4f8f883a75f32 100644
--- a/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
+++ b/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
@@ -346,8 +346,10 @@ static GenericValue lle_X_abort(FunctionType *FT, ArrayRef<GenericValue> Args) {
// Silence warnings about sprintf. (See also
// https://github.com/llvm/llvm-project/issues/58086)
+#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
// int sprintf(char *, const char *, ...) - a very rough implementation to make
// output useful.
static GenericValue lle_X_sprintf(FunctionType *FT,
@@ -429,7 +431,9 @@ static GenericValue lle_X_sprintf(FunctionType *FT,
}
return GV;
}
+#if defined(__clang__)
#pragma clang diagnostic pop
+#endif
// int printf(const char *, ...) - a very rough implementation to make output
// useful.
More information about the llvm-commits
mailing list