Author: jdevlieghere Date: Mon Feb 11 16:30:21 2019 New Revision: 353778 URL: http://llvm.org/viewvc/llvm-project?rev=353778&view=rev Log: Define _ENABLE_EXTENDED_ALIGNED_STORAGE on Windows.
Apparently there are multiple places where MSVC complains about instantiations with extended aligment. I think it's better to define `_ENABLE_EXTENDED_ALIGNED_STORAGE` as suggested by the error message. I don't have access to a Windows machine so this is all speculative. Modified: lldb/trunk/CMakeLists.txt lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Modified: lldb/trunk/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/CMakeLists.txt?rev=353778&r1=353777&r2=353778&view=diff ============================================================================== --- lldb/trunk/CMakeLists.txt (original) +++ lldb/trunk/CMakeLists.txt Mon Feb 11 16:30:21 2019 @@ -28,6 +28,10 @@ if(APPLE) add_definitions(-DLLDB_USE_OS_LOG) endif() +if (WIN32) + add_definitions(-D_ENABLE_EXTENDED_ALIGNED_STORAGE) +endif() + add_subdirectory(docs) if (NOT LLDB_DISABLE_PYTHON) add_subdirectory(scripts) Modified: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp?rev=353778&r1=353777&r2=353778&view=diff ============================================================================== --- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (original) +++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Mon Feb 11 16:30:21 2019 @@ -59,6 +59,8 @@ #include <uuid/uuid.h> #endif +#include <memory> + #define THUMB_ADDRESS_BIT_MASK 0xfffffffffffffffeull using namespace lldb; using namespace lldb_private; @@ -1645,7 +1647,7 @@ void ObjectFileMachO::ProcessSegmentComm // conflict with any of the sections. SectionSP segment_sp; if (add_section && (const_segname || is_core)) { - segment_sp.reset(new Section( + segment_sp = std::make_shared<Section>( module_sp, // Module to which this section belongs this, // Object file to which this sections belongs ++context.NextSegmentIdx @@ -1663,7 +1665,7 @@ void ObjectFileMachO::ProcessSegmentComm load_cmd.filesize, // Size in bytes of this section as found // in the file 0, // Segments have no alignment information - load_cmd.flags)); // Flags for this section + load_cmd.flags); // Flags for this section segment_sp->SetIsEncrypted(segment_is_encrypted); m_sections_ap->AddSection(segment_sp); @@ -1784,7 +1786,7 @@ void ObjectFileMachO::ProcessSegmentComm } } else { // Create a fake section for the section's named segment - segment_sp.reset(new Section( + segment_sp = std::make_shared<Section>( segment_sp, // Parent section module_sp, // Module to which this section belongs this, // Object file to which this section belongs @@ -1805,7 +1807,7 @@ void ObjectFileMachO::ProcessSegmentComm // this section as // found in the file sect64.align, - load_cmd.flags)); // Flags for this section + load_cmd.flags); // Flags for this section segment_sp->SetIsFake(true); segment_sp->SetPermissions(segment_permissions); m_sections_ap->AddSection(segment_sp); @@ -5525,19 +5527,23 @@ ObjectFileMachO::GetThreadContextAtIndex switch (m_header.cputype) { case llvm::MachO::CPU_TYPE_ARM64: - reg_ctx_sp.reset(new RegisterContextDarwin_arm64_Mach(thread, data)); + reg_ctx_sp = + std::make_shared<RegisterContextDarwin_arm64_Mach>(thread, data); break; case llvm::MachO::CPU_TYPE_ARM: - reg_ctx_sp.reset(new RegisterContextDarwin_arm_Mach(thread, data)); + reg_ctx_sp = + std::make_shared<RegisterContextDarwin_arm_Mach>(thread, data); break; case llvm::MachO::CPU_TYPE_I386: - reg_ctx_sp.reset(new RegisterContextDarwin_i386_Mach(thread, data)); + reg_ctx_sp = + std::make_shared<RegisterContextDarwin_i386_Mach>(thread, data); break; case llvm::MachO::CPU_TYPE_X86_64: - reg_ctx_sp.reset(new RegisterContextDarwin_x86_64_Mach(thread, data)); + reg_ctx_sp = + std::make_shared<RegisterContextDarwin_x86_64_Mach>(thread, data); break; } } _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits