forked from OSchip/llvm-project
[IR] DISubprogram::toSPFlags(): fix "enumeral and non-enumeral type in conditional expression"
/build/llvm/include/llvm/IR/DebugInfoMetadata.h: In static member function ‘static llvm::DISubprogram::DISPFlags llvm::DISubprogram::toSPFlags(bool, bool, bool, unsigned int)’: /build/llvm/include/llvm/IR/DebugInfoMetadata.h:1636:50: warning: enumeral and non-enumeral type in conditional expression [-Wextra] (IsLocalToUnit ? SPFlagLocalToUnit : 0) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ /build/llvm/include/llvm/IR/DebugInfoMetadata.h:1637:49: warning: enumeral and non-enumeral type in conditional expression [-Wextra] (IsDefinition ? SPFlagDefinition : 0) | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /build/llvm/include/llvm/IR/DebugInfoMetadata.h:1638:48: warning: enumeral and non-enumeral type in conditional expression [-Wextra] (IsOptimized ? SPFlagOptimized : 0)); ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ llvm-svn: 347250
This commit is contained in:
parent
9ad5717fcc
commit
f284803213
|
@ -1632,10 +1632,11 @@ public:
|
|||
int(SPFlagVirtual) == int(dwarf::DW_VIRTUALITY_virtual) &&
|
||||
int(SPFlagPureVirtual) == int(dwarf::DW_VIRTUALITY_pure_virtual),
|
||||
"Virtuality constant mismatch");
|
||||
return static_cast<DISPFlags>((Virtuality & SPFlagVirtuality) |
|
||||
(IsLocalToUnit ? SPFlagLocalToUnit : 0) |
|
||||
(IsDefinition ? SPFlagDefinition : 0) |
|
||||
(IsOptimized ? SPFlagOptimized : 0));
|
||||
return static_cast<DISPFlags>(
|
||||
(Virtuality & SPFlagVirtuality) |
|
||||
(IsLocalToUnit ? SPFlagLocalToUnit : SPFlagZero) |
|
||||
(IsDefinition ? SPFlagDefinition : SPFlagZero) |
|
||||
(IsOptimized ? SPFlagOptimized : SPFlagZero));
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in New Issue