forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#118177 - sivadeilra:suppress-llvm-warnings, r=cuviper Suppress warnings in LLVM wrapper when targeting MSVC The LLVM header files generate many warnings when compiled using MSVC. This makes it difficult to work on the LLVM wrapper code, because the warnings and errors that are relevant to local edits are obscured by the hundreds of lines of warnings from the LLVM Headers.
- Loading branch information
Showing
4 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#include "SuppressLLVMWarnings.h" | ||
#include "llvm/Linker/Linker.h" | ||
|
||
#include "LLVMWrapper.h" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef _rustc_llvm_SuppressLLVMWarnings_h | ||
#define _rustc_llvm_SuppressLLVMWarnings_h | ||
|
||
// LLVM currently generates many warnings when compiled using MSVC. These warnings make it difficult | ||
// to diagnose real problems when working on C++ code, so we suppress them. | ||
|
||
#ifdef _MSC_VER | ||
#pragma warning(disable:4530) // C++ exception handler used, but unwind semantics are not enabled. | ||
#pragma warning(disable:4624) // 'xxx': destructor was implicitly defined as deleted | ||
#pragma warning(disable:4244) // conversion from 'xxx' to 'yyy', possible loss of data | ||
#endif | ||
|
||
#endif // _rustc_llvm_SuppressLLVMWarnings_h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters