@@ -605,17 +605,16 @@ static ShadowMapping getShadowMapping(const Triple &TargetTriple, int LongSize,
605605 return Mapping;
606606}
607607
608- namespace llvm {
609- void getAddressSanitizerParams (const Triple &TargetTriple, int LongSize,
610- bool IsKasan, uint64_t *ShadowBase,
611- int *MappingScale, bool *OrShadowOffset) {
608+ void llvm::getAddressSanitizerParams (const Triple &TargetTriple, int LongSize,
609+ bool IsKasan, uint64_t *ShadowBase,
610+ int *MappingScale, bool *OrShadowOffset) {
612611 auto Mapping = getShadowMapping (TargetTriple, LongSize, IsKasan);
613612 *ShadowBase = Mapping.Offset ;
614613 *MappingScale = Mapping.Scale ;
615614 *OrShadowOffset = Mapping.OrShadowOffset ;
616615}
617616
618- void removeASanIncompatibleFnAttributes (Function &F, bool ReadsArgMem) {
617+ void llvm:: removeASanIncompatibleFnAttributes (Function &F, bool ReadsArgMem) {
619618 // Sanitizer checks read from shadow, which invalidates memory(argmem: *).
620619 //
621620 // This is not only true for sanitized functions, because AttrInfer can
@@ -668,20 +667,17 @@ ASanAccessInfo::ASanAccessInfo(bool IsWrite, bool CompileKernel,
668667 AccessSizeIndex(AccessSizeIndex), IsWrite(IsWrite),
669668 CompileKernel(CompileKernel) {}
670669
671- } // namespace llvm
672-
673670static uint64_t getRedzoneSizeForScale (int MappingScale) {
674671 // Redzone used for stack and globals is at least 32 bytes.
675672 // For scales 6 and 7, the redzone has to be 64 and 128 bytes respectively.
676673 return std::max (32U , 1U << MappingScale);
677674}
678675
679676static uint64_t GetCtorAndDtorPriority (Triple &TargetTriple) {
680- if (TargetTriple.isOSEmscripten ()) {
677+ if (TargetTriple.isOSEmscripten ())
681678 return kAsanEmscriptenCtorAndDtorPriority ;
682- } else {
679+ else
683680 return kAsanCtorAndDtorPriority ;
684- }
685681}
686682
687683static Twine genName (StringRef suffix) {
0 commit comments