60 const std::string& version) {
64 if (clang.getVersion() != version) {
67 bool error = expected.size() > execVersion.size();
69 for (
size_t i = 0; i < expected.size(); ++i) {
70 if (expected[i] != execVersion[i]) {
77 throw CGException(
"Expected a clang with version '", version,
"' but found version '", clang.getVersion(),
"'");
81 const std::map<std::string, ModelCSourceGen<Base>*>& models = this->modelLibraryHelper_->getModels();
86 for (
const auto& p : models) {
87 const std::map<std::string, std::string>& modelSources = this->getSources(*p.second);
89 this->modelLibraryHelper_->startingJob(
"", JobTimer::COMPILING_FOR_MODEL);
90 clang.generateLLVMBitCode(modelSources, this->modelLibraryHelper_);
91 this->modelLibraryHelper_->finishedJob();
94 const std::map<std::string, std::string>& sources = this->getLibrarySources();
95 clang.generateLLVMBitCode(sources, this->modelLibraryHelper_);
97 const std::map<std::string, std::string>& customSource = this->modelLibraryHelper_->getCustomSources();
98 clang.generateLLVMBitCode(customSource, this->modelLibraryHelper_);
104 return clang.getBitCodeFiles();