[llvm] f44a508 - [nfc] Cleanup extension header generation
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 20 05:44:52 PDT 2020
Author: serge-sans-paille
Date: 2020-04-20T14:44:34+02:00
New Revision: f44a508df629ecc97e0b1345726b12f25927409e
URL: https://github.com/llvm/llvm-project/commit/f44a508df629ecc97e0b1345726b12f25927409e
DIFF: https://github.com/llvm/llvm-project/commit/f44a508df629ecc97e0b1345726b12f25927409e.diff
LOG: [nfc] Cleanup extension header generation
Added:
Modified:
llvm/cmake/modules/AddLLVM.cmake
Removed:
################################################################################
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index 625d1c74458b..7d5094eac00c 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -942,17 +942,18 @@ function(process_llvm_pass_plugins)
DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
COMPONENT cmake-exports)
- file(WRITE "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def.tmp" "//extension handlers\n")
+ set(ExtensionDef "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def")
+ file(WRITE "${ExtensionDef}.tmp" "//extension handlers\n")
foreach(llvm_extension ${LLVM_STATIC_EXTENSIONS})
- file(APPEND "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def.tmp" "HANDLE_EXTENSION(${llvm_extension})\n")
+ file(APPEND "${ExtensionDef}.tmp" "HANDLE_EXTENSION(${llvm_extension})\n")
endforeach()
- file(APPEND "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def.tmp" "#undef HANDLE_EXTENSION\n")
+ file(APPEND "${ExtensionDef}.tmp" "#undef HANDLE_EXTENSION\n")
# only replace if there's an actual change
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_
diff erent
- "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def.tmp"
- "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def")
- file(REMOVE "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def.tmp")
+ "${ExtensionDef}.tmp"
+ "${ExtensionDef}")
+ file(REMOVE "${ExtensionDef}.tmp")
endif()
endfunction()
More information about the llvm-commits
mailing list