summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/BackendUtil.cpp9
-rw-r--r--clang/lib/CodeGen/CGDecl.cpp3
-rw-r--r--clang/lib/Driver/SanitizerArgs.cpp13
3 files changed, 2 insertions, 23 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index e15d357354b..aa0893ef117 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -183,13 +183,8 @@ static void addAddressSanitizerPasses(const PassManagerBuilder &Builder,
const PassManagerBuilderWrapper &BuilderWrapper =
static_cast<const PassManagerBuilderWrapper&>(Builder);
const CodeGenOptions &CGOpts = BuilderWrapper.getCGOpts();
- const LangOptions &LangOpts = BuilderWrapper.getLangOpts();
- PM.add(createAddressSanitizerFunctionPass(LangOpts.Sanitize.InitOrder,
- LangOpts.Sanitize.UseAfterReturn,
- LangOpts.Sanitize.UseAfterScope));
- PM.add(createAddressSanitizerModulePass(
- LangOpts.Sanitize.InitOrder,
- CGOpts.SanitizerBlacklistFile));
+ PM.add(createAddressSanitizerFunctionPass());
+ PM.add(createAddressSanitizerModulePass(CGOpts.SanitizerBlacklistFile));
}
static void addMemorySanitizerPass(const PassManagerBuilder &Builder,
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp
index 8d6b4188733..12c520792fc 100644
--- a/clang/lib/CodeGen/CGDecl.cpp
+++ b/clang/lib/CodeGen/CGDecl.cpp
@@ -795,9 +795,6 @@ static bool shouldUseMemSetPlusStoresToInitialize(llvm::Constant *Init,
/// Should we use the LLVM lifetime intrinsics for the given local variable?
static bool shouldUseLifetimeMarkers(CodeGenFunction &CGF, const VarDecl &D,
unsigned Size) {
- // Always emit lifetime markers in -fsanitize=use-after-scope mode.
- if (CGF.getLangOpts().Sanitize.UseAfterScope)
- return true;
// For now, only in optimized builds.
if (CGF.CGM.getCodeGenOpts().OptimizationLevel == 0)
return false;
diff --git a/clang/lib/Driver/SanitizerArgs.cpp b/clang/lib/Driver/SanitizerArgs.cpp
index 0a74eed4fc2..6a34e89cb97 100644
--- a/clang/lib/Driver/SanitizerArgs.cpp
+++ b/clang/lib/Driver/SanitizerArgs.cpp
@@ -113,14 +113,6 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC,
// -f(-no)sanitize=leak should change whether leak detection is enabled by
// default in ASan?
- // If -fsanitize contains extra features of ASan, it should also
- // explicitly contain -fsanitize=address (probably, turned off later in the
- // command line).
- if ((Kind & AddressFull) != 0 && (AllAdd & Address) == 0)
- D.Diag(diag::warn_drv_unused_sanitizer)
- << lastArgumentForKind(D, Args, AddressFull)
- << "-fsanitize=address";
-
// Parse -f(no-)sanitize-blacklist options.
if (Arg *BLArg = Args.getLastArg(options::OPT_fsanitize_blacklist,
options::OPT_fno_sanitize_blacklist)) {
@@ -210,11 +202,6 @@ unsigned SanitizerArgs::parse(const char *Value) {
#define SANITIZER_GROUP(NAME, ID, ALIAS) .Case(NAME, ID##Group)
#include "clang/Basic/Sanitizers.def"
.Default(SanitizeKind());
- // Assume -fsanitize=address implies -fsanitize=init-order,use-after-return.
- // FIXME: This should be either specified in Sanitizers.def, or go away when
- // we get rid of "-fsanitize=init-order,use-after-return" flags at all.
- if (ParsedKind & Address)
- ParsedKind |= InitOrder | UseAfterReturn;
return ParsedKind;
}
OpenPOWER on IntegriCloud