From c7a89bf3b594d7f355b1e0e43ff505ebdf9af7dd Mon Sep 17 00:00:00 2001 From: Stephane Letz Date: Tue, 2 Apr 2024 00:04:39 +0200 Subject: [PATCH] Add missing header needed in findJSON compilation. --- compiler/generator/llvm/llvm_dynamic_dsp_aux.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/generator/llvm/llvm_dynamic_dsp_aux.cpp b/compiler/generator/llvm/llvm_dynamic_dsp_aux.cpp index 1643097055..5716293fdb 100644 --- a/compiler/generator/llvm/llvm_dynamic_dsp_aux.cpp +++ b/compiler/generator/llvm/llvm_dynamic_dsp_aux.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -100,14 +101,12 @@ using namespace std; // Assuming there is a single JSON string in the module std::string llvm_dsp_factory_aux::findJSON(llvm::Module* module) { -#if LLVM_VERSION_MAJOR >= 16 for (const auto& global : module->globals()) { auto* initializer = global.getInitializer(); if (auto* array = llvm::dyn_cast(initializer)) { if (array->isString()) return array->getAsString().str(); } } -#endif return ""; }