Skip to content

Commit 63e8b2f

Browse files
authored
Use new triple API (#1322)
1 parent 975b41f commit 63e8b2f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ install(TARGETS alive alive-jobserver)
256256
#add_library(alive2 SHARED ${IR_SRCS} ${SMT_SRCS} ${TOOLS_SRCS} ${UTIL_SRCS} ${LLVM_UTIL_SRCS})
257257

258258
if (BUILD_LLVM_UTILS OR BUILD_TV)
259-
llvm_map_components_to_libnames(llvm_libs support core irreader bitwriter analysis passes transformutils codegen AllTargetsCodeGens AllTargetsDescs AllTargetsInfos)
259+
llvm_map_components_to_libnames(llvm_libs support core irreader bitwriter analysis passes transformutils codegen targetparser AllTargetsCodeGens AllTargetsDescs AllTargetsInfos)
260260
# target_link_libraries(alive2 PRIVATE ${llvm_libs})
261261
target_link_libraries(alive-tv PRIVATE ${ALIVE_LIBS_LLVM} ${Z3_LIBRARIES} ${HIREDIS_LIBRARIES} ${llvm_libs})
262262
target_link_libraries(quick-fuzz PRIVATE ${ALIVE_LIBS_LLVM} ${Z3_LIBRARIES} ${HIREDIS_LIBRARIES} ${llvm_libs})

llvm_util/llvm_optimizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ string optimize_module(llvm::Module &M, string_view optArgs) {
2929
Triple ModuleTriple(M.getTargetTriple());
3030
unique_ptr<llvm::TargetMachine> TM;
3131
if (ModuleTriple.getArch()) {
32-
auto ETM = codegen::createTargetMachineForTriple(ModuleTriple.str());
32+
auto ETM = codegen::createTargetMachineForTriple(ModuleTriple);
3333
if (auto E = ETM.takeError())
3434
return toString(std::move(E));
3535
TM = std::move(*ETM);

0 commit comments

Comments
 (0)