Index: include/clang/Driver/SanitizerArgs.h =================================================================== --- include/clang/Driver/SanitizerArgs.h +++ include/clang/Driver/SanitizerArgs.h @@ -49,7 +49,7 @@ bool needsDfsanRt() const { return Sanitizers.has(SanitizerKind::DataFlow); } bool sanitizesVptr() const { return Sanitizers.has(SanitizerKind::Vptr); } - bool hasZeroBaseShadow() const; + bool requiresPIE() const; bool needsUnwindTables() const; bool linkCXXRuntimes() const { return LinkCXXRuntimes; } void addArgs(const llvm::opt::ArgList &Args, Index: lib/Driver/SanitizerArgs.cpp =================================================================== --- lib/Driver/SanitizerArgs.cpp +++ lib/Driver/SanitizerArgs.cpp @@ -42,7 +42,7 @@ #include "clang/Basic/Sanitizers.def" NeedsUbsanRt = Undefined | Integer, NotAllowedWithTrap = Vptr, - HasZeroBaseShadow = Thread | Memory | DataFlow, + RequiresPIE = Memory | DataFlow, NeedsUnwindTables = Address | Thread | Memory | DataFlow }; } @@ -140,8 +140,8 @@ return !UbsanTrapOnError && hasOneOf(Sanitizers, NeedsUbsanRt); } -bool SanitizerArgs::hasZeroBaseShadow() const { - return AsanZeroBaseShadow || hasOneOf(Sanitizers, HasZeroBaseShadow); +bool SanitizerArgs::requiresPIE() const { + return AsanZeroBaseShadow || hasOneOf(Sanitizers, RequiresPIE); } bool SanitizerArgs::needsUnwindTables() const { Index: lib/Driver/ToolChains.cpp =================================================================== --- lib/Driver/ToolChains.cpp +++ lib/Driver/ToolChains.cpp @@ -2507,7 +2507,7 @@ } bool FreeBSD::isPIEDefault() const { - return getSanitizerArgs().hasZeroBaseShadow(); + return getSanitizerArgs().requiresPIE(); } /// NetBSD - NetBSD tool chain which can call as(1) and ld(1) directly. @@ -3383,7 +3383,7 @@ } bool Linux::isPIEDefault() const { - return getSanitizerArgs().hasZeroBaseShadow(); + return getSanitizerArgs().requiresPIE(); } /// DragonFly - DragonFly tool chain which can call as(1) and ld(1) directly.