[Lldb-commits] [PATCH] D30926: Fix MSVC signed/unsigned conversion and size_t conversion warnings in LLDB
hughbe created this revision. I've been porting swift-lldb to Windows/MSVC, and encountered some size_t/unsigned implicit conversion warnings. I sent a PR (https://github.com/apple/swift-lldb/pull/161) and @jimingham suggested I push some of them here. Repository: rL LLVM https://reviews.llvm.org/D30926 Files: Core/FormatEntity.cpp Index: Core/FormatEntity.cpp === --- Core/FormatEntity.cpp +++ Core/FormatEntity.cpp @@ -64,14 +64,14 @@ #define ENTRY_CHILDREN(n, t, f, c) \ { \ n, nullptr, FormatEntity::Entry::Type::t, \ -FormatEntity::Entry::FormatType::f, 0, llvm::array_lengthof(c), c, \ -false \ +FormatEntity::Entry::FormatType::f, 0, \ +static_cast(llvm::array_lengthof(c)), c, false \ } #define ENTRY_CHILDREN_KEEP_SEP(n, t, f, c) \ { \ n, nullptr, FormatEntity::Entry::Type::t, \ -FormatEntity::Entry::FormatType::f, 0, llvm::array_lengthof(c), c, \ -true \ +FormatEntity::Entry::FormatType::f, 0, \ +static_cast(llvm::array_lengthof(c)), c, true \ } #define ENTRY_STRING(n, s) \ { \ Index: Core/FormatEntity.cpp === --- Core/FormatEntity.cpp +++ Core/FormatEntity.cpp @@ -64,14 +64,14 @@ #define ENTRY_CHILDREN(n, t, f, c) \ {\ n, nullptr, FormatEntity::Entry::Type::t, \ -FormatEntity::Entry::FormatType::f, 0, llvm::array_lengthof(c), c, \ -false \ +FormatEntity::Entry::FormatType::f, 0, \ +static_cast(llvm::array_lengthof(c)), c, false \ } #define ENTRY_CHILDREN_KEEP_SEP(n, t, f, c)\ {\ n, nullptr, FormatEntity::Entry::Type::t, \ -FormatEntity::Entry::FormatType::f, 0, llvm::array_lengthof(c), c, \ -true \ +FormatEntity::Entry::FormatType::f, 0, \ +static_cast(llvm::array_lengthof(c)), c, true\ } #define ENTRY_STRING(n, s) \ {\ ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D30927: Normalize the LLVM cmake path before appending it to the module path
hughbe updated this revision to Diff 91668. hughbe added a comment. Fix preview https://reviews.llvm.org/D30927 Files: cmake/modules/LLDBStandalone.cmake Index: cmake/modules/LLDBStandalone.cmake === --- cmake/modules/LLDBStandalone.cmake +++ cmake/modules/LLDBStandalone.cmake @@ -69,6 +69,7 @@ set(LLVMCONFIG_FILE "${LLVM_CMAKE_PATH}/LLVMConfig.cmake") if(EXISTS ${LLVMCONFIG_FILE}) +get_filename_component(LLVM_CMAKE_PATH ${LLVM_CMAKE_PATH} ABSOLUTE) list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}") include(${LLVMCONFIG_FILE}) else() Index: cmake/modules/LLDBStandalone.cmake === --- cmake/modules/LLDBStandalone.cmake +++ cmake/modules/LLDBStandalone.cmake @@ -69,6 +69,7 @@ set(LLVMCONFIG_FILE "${LLVM_CMAKE_PATH}/LLVMConfig.cmake") if(EXISTS ${LLVMCONFIG_FILE}) +get_filename_component(LLVM_CMAKE_PATH ${LLVM_CMAKE_PATH} ABSOLUTE) list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}") include(${LLVMCONFIG_FILE}) else() ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D30927: Normalize the LLVM cmake path before appending it to the module path
hughbe created this revision. hughbe added a project: LLDB. Herald added a subscriber: mgorny. LLVM_CMAKE_PATH has backlashes in it. CMake then tries to append this to CMAKE_MODULE_PATH but gets confused and errors out as it thinks we're providing an escape sequence (that's unknown, causing generation to fail) E.g "C:\Users\hugh..." I've been porting swift to Windows/MSVC. This was causing the Windows build to fail and I submitted a PR (https://github.com/apple/swift-lldb/pull/156). Maybe it belongs upstream, however Repository: rL LLVM https://reviews.llvm.org/D30927 Files: modules/LLDBStandalone.cmake Index: modules/LLDBStandalone.cmake === --- modules/LLDBStandalone.cmake +++ modules/LLDBStandalone.cmake @@ -69,6 +69,7 @@ set(LLVMCONFIG_FILE "${LLVM_CMAKE_PATH}/LLVMConfig.cmake") if(EXISTS ${LLVMCONFIG_FILE}) +get_filename_component(LLVM_CMAKE_PATH ${LLVM_CMAKE_PATH} ABSOLUTE) list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}") include(${LLVMCONFIG_FILE}) else() Index: modules/LLDBStandalone.cmake === --- modules/LLDBStandalone.cmake +++ modules/LLDBStandalone.cmake @@ -69,6 +69,7 @@ set(LLVMCONFIG_FILE "${LLVM_CMAKE_PATH}/LLVMConfig.cmake") if(EXISTS ${LLVMCONFIG_FILE}) +get_filename_component(LLVM_CMAKE_PATH ${LLVM_CMAKE_PATH} ABSOLUTE) list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}") include(${LLVMCONFIG_FILE}) else() ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D30926: Fix MSVC signed/unsigned conversion and size_t conversion warnings in LLDB
hughbe updated this revision to Diff 91670. hughbe added a comment. Fix file names https://reviews.llvm.org/D30926 Files: source/Core/FormatEntity.cpp Index: source/Core/FormatEntity.cpp === --- source/Core/FormatEntity.cpp +++ source/Core/FormatEntity.cpp @@ -64,14 +64,14 @@ #define ENTRY_CHILDREN(n, t, f, c) \ { \ n, nullptr, FormatEntity::Entry::Type::t, \ -FormatEntity::Entry::FormatType::f, 0, llvm::array_lengthof(c), c, \ -false \ +FormatEntity::Entry::FormatType::f, 0, \ +static_cast(llvm::array_lengthof(c)), c, false \ } #define ENTRY_CHILDREN_KEEP_SEP(n, t, f, c) \ { \ n, nullptr, FormatEntity::Entry::Type::t, \ -FormatEntity::Entry::FormatType::f, 0, llvm::array_lengthof(c), c, \ -true \ +FormatEntity::Entry::FormatType::f, 0, \ +static_cast(llvm::array_lengthof(c)), c, true \ } #define ENTRY_STRING(n, s) \ { \ Index: source/Core/FormatEntity.cpp === --- source/Core/FormatEntity.cpp +++ source/Core/FormatEntity.cpp @@ -64,14 +64,14 @@ #define ENTRY_CHILDREN(n, t, f, c) \ {\ n, nullptr, FormatEntity::Entry::Type::t, \ -FormatEntity::Entry::FormatType::f, 0, llvm::array_lengthof(c), c, \ -false \ +FormatEntity::Entry::FormatType::f, 0, \ +static_cast(llvm::array_lengthof(c)), c, false \ } #define ENTRY_CHILDREN_KEEP_SEP(n, t, f, c)\ {\ n, nullptr, FormatEntity::Entry::Type::t, \ -FormatEntity::Entry::FormatType::f, 0, llvm::array_lengthof(c), c, \ -true \ +FormatEntity::Entry::FormatType::f, 0, \ +static_cast(llvm::array_lengthof(c)), c, true\ } #define ENTRY_STRING(n, s) \ {\ ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D30927: Normalize the LLVM cmake path before appending it to the module path
hughbe updated this revision to Diff 91676. hughbe added a comment. Address feedback from Zachary Turner https://reviews.llvm.org/D30927 Files: cmake/modules/LLDBStandalone.cmake Index: cmake/modules/LLDBStandalone.cmake === --- cmake/modules/LLDBStandalone.cmake +++ cmake/modules/LLDBStandalone.cmake @@ -69,6 +69,7 @@ set(LLVMCONFIG_FILE "${LLVM_CMAKE_PATH}/LLVMConfig.cmake") if(EXISTS ${LLVMCONFIG_FILE}) +file(TO_CMAKE_PATH "${LLVM_CMAKE_PATH}" LLVM_CMAKE_PATH) list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}") include(${LLVMCONFIG_FILE}) else() Index: cmake/modules/LLDBStandalone.cmake === --- cmake/modules/LLDBStandalone.cmake +++ cmake/modules/LLDBStandalone.cmake @@ -69,6 +69,7 @@ set(LLVMCONFIG_FILE "${LLVM_CMAKE_PATH}/LLVMConfig.cmake") if(EXISTS ${LLVMCONFIG_FILE}) +file(TO_CMAKE_PATH "${LLVM_CMAKE_PATH}" LLVM_CMAKE_PATH) list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}") include(${LLVMCONFIG_FILE}) else() ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D30927: Normalize the LLVM cmake path before appending it to the module path
hughbe edited reviewers, added: zturner; removed: beanz. hughbe added a comment. As per discussion on lists https://reviews.llvm.org/D30927 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D30926: Fix MSVC signed/unsigned conversion and size_t conversion warnings in LLDB
hughbe edited reviewers, added: zturner; removed: jingham, hughbe. hughbe added a comment. This revision now requires review to proceed. As per discussion on lists https://reviews.llvm.org/D30926 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits