Update the minimum external LLVM to 13
This commit is contained in:
@@ -24,17 +24,10 @@ extern "C" void LLVMRustCoverageWriteFilenamesSectionToBuffer(
|
||||
const char* const Filenames[],
|
||||
size_t FilenamesLen,
|
||||
RustStringRef BufferOut) {
|
||||
#if LLVM_VERSION_GE(13,0)
|
||||
SmallVector<std::string,32> FilenameRefs;
|
||||
for (size_t i = 0; i < FilenamesLen; i++) {
|
||||
FilenameRefs.push_back(std::string(Filenames[i]));
|
||||
}
|
||||
#else
|
||||
SmallVector<StringRef,32> FilenameRefs;
|
||||
for (size_t i = 0; i < FilenamesLen; i++) {
|
||||
FilenameRefs.push_back(StringRef(Filenames[i]));
|
||||
}
|
||||
#endif
|
||||
auto FilenamesWriter = coverage::CoverageFilenamesSectionWriter(
|
||||
makeArrayRef(FilenameRefs));
|
||||
RawRustStringOstream OS(BufferOut);
|
||||
@@ -109,9 +102,5 @@ extern "C" void LLVMRustCoverageWriteMappingVarNameToString(RustStringRef Str) {
|
||||
}
|
||||
|
||||
extern "C" uint32_t LLVMRustCoverageMappingVersion() {
|
||||
#if LLVM_VERSION_GE(13, 0)
|
||||
return coverage::CovMapVersion::Version6;
|
||||
#else
|
||||
return coverage::CovMapVersion::Version5;
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user