File tree Expand file tree Collapse file tree 4 files changed +17
-0
lines changed
compiler/rustc_llvm/llvm-wrapper Expand file tree Collapse file tree 4 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 1+ #include " SuppressLLVMWarnings.h"
2+
13#include " llvm-c/BitReader.h"
24#include " llvm-c/Core.h"
35#include " llvm-c/Object.h"
Original file line number Diff line number Diff line change 1+ #include " SuppressLLVMWarnings.h"
12#include " llvm/Linker/Linker.h"
23
34#include " LLVMWrapper.h"
Original file line number Diff line number Diff line change 1+ #ifndef _rustc_llvm_SuppressLLVMWarnings_h
2+ #define _rustc_llvm_SuppressLLVMWarnings_h
3+
4+ // LLVM currently generates many warnings when compiled using MSVC. These warnings make it difficult
5+ // to diagnose real problems when working on C++ code, so we suppress them.
6+
7+ #ifdef _MSC_VER
8+ #pragma warning(disable:4530) // C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
9+ #pragma warning(disable:4624) // 'xxx': destructor was implicitly defined as deleted
10+ #pragma warning(disable:4244) // 'initializing': conversion from 'xxx' to 'yyy', possible loss of data
11+ #endif
12+
13+ #endif // _rustc_llvm_SuppressLLVMWarnings_h
Original file line number Diff line number Diff line change 77// * https://github.com/llvm/llvm-project/blob/8ef3e895ad8ab1724e2b87cabad1dacdc7a397a3/llvm/include/llvm/Object/ArchiveWriter.h
88// * https://github.com/llvm/llvm-project/blob/8ef3e895ad8ab1724e2b87cabad1dacdc7a397a3/llvm/lib/Object/ArchiveWriter.cpp
99
10+ #include " SuppressLLVMWarnings.h"
1011#include " llvm/ADT/SmallString.h"
1112#include " llvm/IR/LLVMContext.h"
1213#include " llvm/Object/ObjectFile.h"
You can’t perform that action at this time.
0 commit comments