From e24f8ba4b086ea72cfeeb008a4afb9725d1de1bb Mon Sep 17 00:00:00 2001 From: van Hauser Date: Mon, 2 Nov 2020 13:53:27 +0100 Subject: fix SancovPCGUARD for 10.0.0 --- instrumentation/SanitizerCoveragePCGUARD.so.cc | 28 ++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'instrumentation/SanitizerCoveragePCGUARD.so.cc') diff --git a/instrumentation/SanitizerCoveragePCGUARD.so.cc b/instrumentation/SanitizerCoveragePCGUARD.so.cc index 124679f5..b8e3570a 100644 --- a/instrumentation/SanitizerCoveragePCGUARD.so.cc +++ b/instrumentation/SanitizerCoveragePCGUARD.so.cc @@ -68,11 +68,17 @@ class ModuleSanitizerCoveragePass : Options(Options) { if (AllowlistFiles.size() > 0) - Allowlist = SpecialCaseList::createOrDie(AllowlistFiles, - *vfs::getRealFileSystem()); + Allowlist = SpecialCaseList::createOrDie(AllowlistFiles +#if LLVM_MAJOR > 10 || (LLVM_MAJOR == 10 && LLVM_MINOR > 0) + , *vfs::getRealFileSystem() +#endif + ); if (BlocklistFiles.size() > 0) - Blocklist = SpecialCaseList::createOrDie(BlocklistFiles, - *vfs::getRealFileSystem()); + Blocklist = SpecialCaseList::createOrDie(BlocklistFiles +#if LLVM_MAJOR > 10 || (LLVM_MAJOR == 10 && LLVM_MINOR > 0) + , *vfs::getRealFileSystem() +#endif + ); } @@ -371,11 +377,17 @@ class ModuleSanitizerCoverageLegacyPass : public ModulePass { : ModulePass(ID), Options(Options) { if (AllowlistFiles.size() > 0) - Allowlist = SpecialCaseList::createOrDie(AllowlistFiles, - *vfs::getRealFileSystem()); + Allowlist = SpecialCaseList::createOrDie(AllowlistFiles +#if LLVM_MAJOR > 10 || (LLVM_MAJOR == 10 && LLVM_MINOR > 0) + , *vfs::getRealFileSystem() +#endif + ); if (BlocklistFiles.size() > 0) - Blocklist = SpecialCaseList::createOrDie(BlocklistFiles, - *vfs::getRealFileSystem()); + Blocklist = SpecialCaseList::createOrDie(BlocklistFiles +#if LLVM_MAJOR > 10 || (LLVM_MAJOR == 10 && LLVM_MINOR > 0) + , *vfs::getRealFileSystem() +#endif + ); initializeModuleSanitizerCoverageLegacyPassPass( *PassRegistry::getPassRegistry()); -- cgit v1.2.3