Skip to content

Commit

Permalink
Revert DSE workarounds, this was causing some problems in main.
Browse files Browse the repository at this point in the history
Revert "[clangd] Fix builds after 4ddae8b"

This reverts commit ae42196.

Revert "[clangd] Fix test failure when it's built with compiler flags unknown by clang"

This reverts commit 21f3dfb.

Revert "[cmake] Disable GCC lifetime DSE"

This reverts commit d5cce0a.

Revert "[clang-tidy][test] Add trailing -- to suppress compile_commands.json read"

This reverts commit 57262bb.
  • Loading branch information
tstellar committed May 31, 2023
1 parent 8407887 commit 87e99de
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
7 changes: 0 additions & 7 deletions clang-tools-extra/clangd/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ configure_lit_site_cfg(
${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py
)

# Copy an empty compile_flags.txt to make sure tests don't pick up arbitrary
# commands from parents.
file(
TOUCH
${CMAKE_CURRENT_BINARY_DIR}/compile_flags.txt
)

add_lit_testsuite(check-clangd "Running the Clangd regression tests"
# clangd doesn't put unittest configs in test/unit like every other project.
# Because of that, this needs to pass two folders here, while every other
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: %check_clang_tidy %s performance-trivially-destructible %t
// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp
// RUN: clang-tidy %t.cpp -checks='-*,performance-trivially-destructible' -fix --
// RUN: clang-tidy %t.cpp -checks='-*,performance-trivially-destructible' -warnings-as-errors='-*,performance-trivially-destructible' --
// RUN: clang-tidy %t.cpp -checks='-*,performance-trivially-destructible' -fix
// RUN: clang-tidy %t.cpp -checks='-*,performance-trivially-destructible' -warnings-as-errors='-*,performance-trivially-destructible'

struct TriviallyDestructible1 {
int a;
Expand Down
10 changes: 0 additions & 10 deletions llvm/cmake/modules/HandleLLVMOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -582,16 +582,6 @@ if ( LLVM_COMPILER_IS_GCC_COMPATIBLE OR CMAKE_CXX_COMPILER_ID MATCHES "XL" )
add_flag_if_supported("-Werror=unguarded-availability-new" WERROR_UNGUARDED_AVAILABILITY_NEW)
endif( LLVM_COMPILER_IS_GCC_COMPATIBLE OR CMAKE_CXX_COMPILER_ID MATCHES "XL" )

if ( LLVM_COMPILER_IS_GCC_COMPATIBLE )
# LLVM data structures like llvm::User and llvm::MDNode rely on
# the value of object storage persisting beyond the lifetime of the
# object (#24952). This is not standard compliant and causes a runtime
# crash if LLVM is built with GCC and LTO enabled (#57740). Until
# these bugs are fixed, we need to disable dead store eliminations
# based on object lifetime.
add_flag_if_supported("-fno-lifetime-dse" CMAKE_CXX_FLAGS)
endif ( LLVM_COMPILER_IS_GCC_COMPATIBLE )

# Modules enablement for GCC-compatible compilers:
if ( LLVM_COMPILER_IS_GCC_COMPATIBLE AND LLVM_ENABLE_MODULES )
set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
Expand Down

0 comments on commit 87e99de

Please sign in to comment.