[Lldb-commits] [lldb] r347020 - Don't use uniform initialization syntax.
Zachary Turner via lldb-commits
lldb-commits at lists.llvm.org
Thu Nov 15 19:16:27 PST 2018
Author: zturner
Date: Thu Nov 15 19:16:27 2018
New Revision: 347020
URL: http://llvm.org/viewvc/llvm-project?rev=347020&view=rev
Log:
Don't use uniform initialization syntax.
Modified:
lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbIndex.cpp
lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbSymUid.h
lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
Modified: lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbIndex.cpp?rev=347020&r1=347019&r2=347020&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbIndex.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbIndex.cpp Thu Nov 15 19:16:27 2018
@@ -134,7 +134,7 @@ void PdbIndex::BuildAddrToSymbolMap(Comp
// We need to add 4 here to adjust for the codeview debug magic
// at the beginning of the debug info stream.
uint32_t sym_offset = iter.offset() + 4;
- PdbCompilandSymId cu_sym_id{modi, sym_offset};
+ PdbCompilandSymId cu_sym_id(modi, sym_offset);
// If the debug info is incorrect, we could have multiple symbols with the
// same address. So use try_emplace instead of insert, and the first one
Modified: lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbSymUid.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbSymUid.h?rev=347020&r1=347019&r2=347020&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbSymUid.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbSymUid.h Thu Nov 15 19:16:27 2018
@@ -43,6 +43,9 @@ struct PdbCompilandId {
};
struct PdbCompilandSymId {
+ PdbCompilandSymId() = default;
+ PdbCompilandSymId(uint16_t modi, uint32_t offset)
+ : modi(modi), offset(offset) {}
// 0-based index of module in PDB
uint16_t modi = 0;
@@ -53,6 +56,10 @@ struct PdbCompilandSymId {
};
struct PdbGlobalSymId {
+ PdbGlobalSymId() = default;
+ PdbGlobalSymId(uint32_t offset, bool is_public)
+ : offset(offset), is_public(is_public) {}
+
// Offset of symbol's record in globals or publics stream.
uint32_t offset = 0;
@@ -62,6 +69,10 @@ struct PdbGlobalSymId {
};
struct PdbTypeSymId {
+ PdbTypeSymId() = default;
+ PdbTypeSymId(llvm::codeview::TypeIndex index, bool is_ipi = false)
+ : index(index), is_ipi(is_ipi) {}
+
// The index of the of the type in the TPI or IPI stream.
llvm::codeview::TypeIndex index;
Modified: lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp?rev=347020&r1=347019&r2=347020&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp Thu Nov 15 19:16:27 2018
@@ -729,7 +729,7 @@ lldb::FunctionSP SymbolFileNativePDB::Cr
Type *func_type = nullptr;
// FIXME: Resolve types and mangled names.
- PdbTypeSymId sig_id{TypeIndex::None(), false};
+ PdbTypeSymId sig_id(TypeIndex::None(), false);
Mangled mangled(getSymbolName(sym_record));
FunctionSP func_sp = std::make_shared<Function>(
sc.comp_unit, toOpaqueUid(func_id), toOpaqueUid(sig_id), mangled,
@@ -830,7 +830,7 @@ lldb::TypeSP SymbolFileNativePDB::Create
}
lldb::TypeSP SymbolFileNativePDB::CreateSimpleType(TypeIndex ti) {
- uint64_t uid = toOpaqueUid(PdbTypeSymId{ti, false});
+ uint64_t uid = toOpaqueUid(PdbTypeSymId(ti, false));
if (ti == TypeIndex::NullptrT()) {
CompilerType ct = m_clang->GetBasicType(eBasicTypeNullPtr);
Declaration decl;
@@ -1163,7 +1163,7 @@ TypeSP SymbolFileNativePDB::CreateAndCac
if (!expected_full_ti)
llvm::consumeError(expected_full_ti.takeError());
else if (*expected_full_ti != type_id.index) {
- full_decl_uid = PdbTypeSymId{*expected_full_ti, false};
+ full_decl_uid = PdbTypeSymId(*expected_full_ti, false);
// It's possible that a lookup would occur for the full decl causing it
// to be cached, then a second lookup would occur for the forward decl.
@@ -1197,7 +1197,6 @@ TypeSP SymbolFileNativePDB::CreateAndCac
m_clang->GetAsTagDecl(result->GetForwardCompilerType());
lldbassert(record_decl);
- TypeIndex ti(type_id.index);
m_uid_to_decl[best_uid] = record_decl;
m_decl_to_status[record_decl] =
DeclStatus(best_uid, Type::eResolveStateForward);
@@ -1343,7 +1342,7 @@ VariableSP SymbolFileNativePDB::CreateGl
}
Declaration decl;
- PdbTypeSymId tid{ti, false};
+ PdbTypeSymId tid(ti, false);
SymbolFileTypeSP type_sp =
std::make_shared<SymbolFileType>(*this, toOpaqueUid(tid));
Variable::RangeList ranges;
@@ -1371,7 +1370,7 @@ SymbolFileNativePDB::CreateConstantSymbo
llvm::cantFail(SymbolDeserializer::deserializeAs<ConstantSym>(cvs, constant));
std::string global_name("::");
global_name += constant.Name;
- PdbTypeSymId tid{constant.Type, false};
+ PdbTypeSymId tid(constant.Type, false);
SymbolFileTypeSP type_sp =
std::make_shared<SymbolFileType>(*this, toOpaqueUid(tid));
@@ -1399,7 +1398,7 @@ SymbolFileNativePDB::GetOrCreateGlobalVa
}
lldb::TypeSP SymbolFileNativePDB::GetOrCreateType(TypeIndex ti) {
- return GetOrCreateType(PdbTypeSymId{ti, false});
+ return GetOrCreateType(PdbTypeSymId(ti, false));
}
FunctionSP SymbolFileNativePDB::GetOrCreateFunction(PdbCompilandSymId func_id,
@@ -1680,7 +1679,7 @@ uint32_t SymbolFileNativePDB::FindGlobal
case SymbolKind::S_GTHREAD32:
case SymbolKind::S_LTHREAD32:
case SymbolKind::S_CONSTANT: {
- PdbGlobalSymId global{result.first, false};
+ PdbGlobalSymId global(result.first, false);
var = GetOrCreateGlobalVariable(global);
variables.AddVariable(var);
break;
@@ -1719,7 +1718,7 @@ uint32_t SymbolFileNativePDB::FindFuncti
sc.comp_unit = GetOrCreateCompileUnit(cci).get();
sc.module_sp = sc.comp_unit->GetModule();
- PdbCompilandSymId func_id{proc.modi(), proc.SymOffset};
+ PdbCompilandSymId func_id(proc.modi(), proc.SymOffset);
sc.function = GetOrCreateFunction(func_id, sc).get();
sc_list.Append(sc);
@@ -1856,7 +1855,7 @@ bool SymbolFileNativePDB::CompleteType(C
lldbassert(!IsForwardRefUdt(cvt));
unmodified_type = *expected_full_ti;
}
- type_id = PdbTypeSymId{unmodified_type, false};
+ type_id = PdbTypeSymId(unmodified_type, false);
}
TypeIndex field_list_ti = GetFieldListIndex(cvt);
CVType field_list_cvt = m_index->tpi().getType(field_list_ti);
More information about the lldb-commits
mailing list