[LLVM 4.0] Support new DIFlags enum
This commit is contained in:
parent
dbdd60e6d7
commit
757a9cea3f
@ -397,8 +397,13 @@ inline LLVMRustDIFlags visibility(LLVMRustDIFlags f) {
|
||||
return static_cast<LLVMRustDIFlags>(static_cast<uint32_t>(f) & 0x3);
|
||||
}
|
||||
|
||||
#if LLVM_VERSION_GE(4, 0)
|
||||
static DINode::DIFlags from_rust(LLVMRustDIFlags flags) {
|
||||
DINode::DIFlags result = DINode::DIFlags::FlagZero;
|
||||
#else
|
||||
static unsigned from_rust(LLVMRustDIFlags flags) {
|
||||
unsigned result = 0;
|
||||
#endif
|
||||
|
||||
switch (visibility(flags)) {
|
||||
case LLVMRustDIFlags::FlagPrivate:
|
||||
|
Loading…
Reference in New Issue
Block a user