Browse Source

Fix implicit unique_ptr to bool conversion error when compiling with GCC. (#1720)

Tristan Labelle 6 năm trước cách đây
mục cha
commit
e9dac9bd79
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      include/llvm/IR/ValueMap.h

+ 1 - 1
include/llvm/IR/ValueMap.h

@@ -99,7 +99,7 @@ public:
   explicit ValueMap(const ExtraData &Data, unsigned NumInitBuckets = 64)
       : Map(NumInitBuckets), Data(Data) {}
 
-  bool hasMD() const { return MDMap; }
+  bool hasMD() const { return bool(MDMap); }
   MDMapT &MD() {
     if (!MDMap)
       MDMap.reset(new MDMapT);