Author: zturner Date: Tue Jan 29 14:55:21 2019 New Revision: 352557 URL: http://llvm.org/viewvc/llvm-project?rev=352557&view=rev Log: Fix some warnings in building LLDB.
Differential Revision: https://reviews.llvm.org/D57413 Modified: lldb/trunk/source/Commands/CommandObjectReproducer.cpp lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp lldb/trunk/source/Plugins/Language/ObjC/NSArray.cpp lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Modified: lldb/trunk/source/Commands/CommandObjectReproducer.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectReproducer.cpp?rev=352557&r1=352556&r2=352557&view=diff ============================================================================== --- lldb/trunk/source/Commands/CommandObjectReproducer.cpp (original) +++ lldb/trunk/source/Commands/CommandObjectReproducer.cpp Tue Jan 29 14:55:21 2019 @@ -67,12 +67,11 @@ protected: } auto &r = repro::Reproducer::Instance(); - if (auto generator = r.GetGenerator()) { + if (r.GetGenerator()) { result.GetOutputStream() << "Reproducer is in capture mode.\n"; - } else if (auto generator = r.GetLoader()) { + } else if (r.GetLoader()) { result.GetOutputStream() << "Reproducer is in replay mode.\n"; } else { - result.GetOutputStream() << "Reproducer is off.\n"; } Modified: lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp?rev=352557&r1=352556&r2=352557&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp (original) +++ lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp Tue Jan 29 14:55:21 2019 @@ -754,7 +754,7 @@ typedef union { uint64_t fraction:52; // unsigned uint64_t exponent:11; // signed uint64_t sign:1; - }; + } repr; uint64_t i; double d; } DoubleBits; @@ -764,7 +764,7 @@ typedef union { uint64_t exponent:7; // signed uint64_t sign:1; uint64_t unused:4; // placeholder for pointer tag bits - }; + } repr; uint64_t i; } TaggedDoubleBits; @@ -786,10 +786,10 @@ static uint64_t decodeTaggedTimeInterval // Sign and fraction are represented exactly. // Exponent is encoded. - assert(encodedBits.unused == 0); - decodedBits.sign = encodedBits.sign; - decodedBits.fraction = encodedBits.fraction; - decodedBits.exponent = decodeExponent(encodedBits.exponent); + assert(encodedBits.repr.unused == 0); + decodedBits.repr.sign = encodedBits.repr.sign; + decodedBits.repr.fraction = encodedBits.repr.fraction; + decodedBits.repr.exponent = decodeExponent(encodedBits.repr.exponent); return decodedBits.d; } Modified: lldb/trunk/source/Plugins/Language/ObjC/NSArray.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/NSArray.cpp?rev=352557&r1=352556&r2=352557&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Language/ObjC/NSArray.cpp (original) +++ lldb/trunk/source/Plugins/Language/ObjC/NSArray.cpp Tue Jan 29 14:55:21 2019 @@ -171,13 +171,8 @@ namespace Foundation1437 { PtrType _data; uint32_t _offset; uint32_t _size; - union { - PtrType _mutations; - struct { - uint32_t _muts; - uint32_t _used; - }; - }; + uint32_t _muts; + uint32_t _used; }; using NSArrayMSyntheticFrontEnd = Modified: lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp?rev=352557&r1=352556&r2=352557&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp (original) +++ lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp Tue Jan 29 14:55:21 2019 @@ -281,18 +281,11 @@ namespace Foundation1437 { struct DataDescriptor_32 { uint32_t _buffer; - union { - struct { - uint32_t _mutations; - }; - struct { - uint32_t _muts; - uint32_t _used:25; - uint32_t _kvo:1; - uint32_t _szidx:6; - }; - }; - + uint32_t _muts; + uint32_t _used : 25; + uint32_t _kvo : 1; + uint32_t _szidx : 6; + uint64_t GetSize() { return (_szidx) >= NSDictionaryNumSizeBuckets ? 0 : NSDictionaryCapacities[_szidx]; @@ -301,18 +294,11 @@ namespace Foundation1437 { struct DataDescriptor_64 { uint64_t _buffer; - union { - struct { - uint64_t _mutations; - }; - struct { - uint32_t _muts; - uint32_t _used:25; - uint32_t _kvo:1; - uint32_t _szidx:6; - }; - }; - + uint32_t _muts; + uint32_t _used : 25; + uint32_t _kvo : 1; + uint32_t _szidx : 6; + uint64_t GetSize() { return (_szidx) >= NSDictionaryNumSizeBuckets ? 0 : NSDictionaryCapacities[_szidx]; Modified: lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp?rev=352557&r1=352556&r2=352557&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp (original) +++ lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp Tue Jan 29 14:55:21 2019 @@ -154,28 +154,18 @@ namespace Foundation1437 { uint32_t _cow; // __table storage uint32_t _objs_addr; - union { - uint32_t _mutations; - struct { - uint32_t _muts; - uint32_t _used : 26; - uint32_t _szidx : 6; - }; - }; + uint32_t _muts; + uint32_t _used : 26; + uint32_t _szidx : 6; }; struct DataDescriptor_64 { uint64_t _cow; // __Table storage uint64_t _objs_addr; - union { - uint64_t _mutations; - struct { - uint32_t _muts; - uint32_t _used : 26; - uint32_t _szidx : 6; - }; - }; + uint32_t _muts; + uint32_t _used : 26; + uint32_t _szidx : 6; }; using NSSetMSyntheticFrontEnd = Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp?rev=352557&r1=352556&r2=352557&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp (original) +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp Tue Jan 29 14:55:21 2019 @@ -1263,7 +1263,7 @@ void GDBRemoteCommunication::DumpHistory void GDBRemoteCommunication::SetHistoryStream(llvm::raw_ostream *strm) { m_history.SetStream(strm); -}; +} llvm::Error GDBRemoteCommunication::ConnectLocally(GDBRemoteCommunication &client, Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp?rev=352557&r1=352556&r2=352557&view=diff ============================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp (original) +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Tue Jan 29 14:55:21 2019 @@ -1663,7 +1663,6 @@ TypeSP DWARFASTParserClang::ParseTypeFro dwarf->GetDIEToType()[die.GetDIE()] = DIE_IS_BEING_PARSED; DWARFFormValue type_die_form; - int64_t first_index = 0; uint32_t byte_stride = 0; uint32_t bit_stride = 0; bool is_vector = false; @@ -1733,7 +1732,6 @@ TypeSP DWARFASTParserClang::ParseTypeFro if (element_type) { auto array_info = ParseChildArrayInfo(die); if (array_info) { - first_index = array_info->first_index; byte_stride = array_info->byte_stride; bit_stride = array_info->bit_stride; } _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits