[llvm] e32936a - [MSVC] Silence -Wnon-virtual-dtor on DIA APIs

Alexandre Ganea via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 3 10:29:15 PST 2022


Author: Alexandre Ganea
Date: 2022-01-03T13:29:08-05:00
New Revision: e32936aef4a2e7da471e84b72d3be3499adf0a21

URL: https://github.com/llvm/llvm-project/commit/e32936aef4a2e7da471e84b72d3be3499adf0a21
DIFF: https://github.com/llvm/llvm-project/commit/e32936aef4a2e7da471e84b72d3be3499adf0a21.diff

LOG: [MSVC] Silence -Wnon-virtual-dtor on DIA APIs

Differential Revision: https://reviews.llvm.org/D116313

Added: 
    

Modified: 
    clang/lib/Driver/ToolChains/MSVCSetupApi.h
    llvm/lib/DebugInfo/PDB/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/clang/lib/Driver/ToolChains/MSVCSetupApi.h b/clang/lib/Driver/ToolChains/MSVCSetupApi.h
index a890b85fd5e98..28e6e3e08e37f 100644
--- a/clang/lib/Driver/ToolChains/MSVCSetupApi.h
+++ b/clang/lib/Driver/ToolChains/MSVCSetupApi.h
@@ -28,6 +28,11 @@
 
 #pragma once
 
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
+#endif
+
 // Constants
 //
 #ifndef E_NOTFOUND
@@ -512,3 +517,7 @@ STDMETHODIMP GetSetupConfiguration(_Out_ ISetupConfiguration **ppConfiguration,
 #ifdef __cplusplus
 }
 #endif
+
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif

diff  --git a/llvm/lib/DebugInfo/PDB/CMakeLists.txt b/llvm/lib/DebugInfo/PDB/CMakeLists.txt
index 090711c834041..851c5c3dc03c4 100644
--- a/llvm/lib/DebugInfo/PDB/CMakeLists.txt
+++ b/llvm/lib/DebugInfo/PDB/CMakeLists.txt
@@ -4,7 +4,7 @@ macro(add_pdb_impl_folder group)
 endmacro()
 
 if(LLVM_ENABLE_DIA_SDK)
-  include_directories(${MSVC_DIA_SDK_DIR}/include)
+  include_directories(SYSTEM ${MSVC_DIA_SDK_DIR}/include)
   set(LIBPDB_LINK_FOLDERS "${MSVC_DIA_SDK_DIR}\\lib")
 
   if ("$ENV{VSCMD_ARG_TGT_ARCH}" STREQUAL "arm64")


        


More information about the llvm-commits mailing list