From 0863d940fe6d2d872bb83b2e172d61bdebe8576d Mon Sep 17 00:00:00 2001 From: van Hauser Date: Mon, 2 Nov 2020 16:24:16 +0100 Subject: [PATCH] more llvm 10.0.0 fixes --- instrumentation/SanitizerCoveragePCGUARD.so.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/instrumentation/SanitizerCoveragePCGUARD.so.cc b/instrumentation/SanitizerCoveragePCGUARD.so.cc index b8e3570a..7019dd87 100644 --- a/instrumentation/SanitizerCoveragePCGUARD.so.cc +++ b/instrumentation/SanitizerCoveragePCGUARD.so.cc @@ -913,7 +913,9 @@ GlobalVariable *ModuleSanitizerCoverage::CreateFunctionLocalArrayInSection( GetOrCreateFunctionComdat(F, TargetTriple, CurModuleUniqueId)) Array->setComdat(Comdat); Array->setSection(getSectionName(Section)); +#if LLVM_MAJOR > 10 || (LLVM_MAJOR == 10 && LLVM_MINOR > 0) Array->setAlignment(Align(DL->getTypeStoreSize(Ty).getFixedSize())); +#endif GlobalsToAppendToUsed.push_back(Array); GlobalsToAppendToCompilerUsed.push_back(Array); MDNode *MD = MDNode::get(F.getContext(), ValueAsMetadata::get(&F));