aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2012-12-24 08:42:34 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2012-12-24 08:42:34 +0000
commit34ef11be9d09ebf916ab02a521e37be6e9e102d3 (patch)
treedba3c42c9353281ba47578b68e9b76f7247097c5 /lib/CodeGen
parentcc6456c07a64ba4db7ab972d2519ad985e328289 (diff)
Support -fsanitize-memory-track-origins.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171020 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/BackendUtil.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp
index ff593620fd..ea5bcb55f8 100644
--- a/lib/CodeGen/BackendUtil.cpp
+++ b/lib/CodeGen/BackendUtil.cpp
@@ -188,7 +188,10 @@ static void addAddressSanitizerPasses(const PassManagerBuilder &Builder,
static void addMemorySanitizerPass(const PassManagerBuilder &Builder,
PassManagerBase &PM) {
- PM.add(createMemorySanitizerPass());
+ const PassManagerBuilderWrapper &BuilderWrapper =
+ static_cast<const PassManagerBuilderWrapper&>(Builder);
+ const CodeGenOptions &CGOpts = BuilderWrapper.getCGOpts();
+ PM.add(createMemorySanitizerPass(CGOpts.MemorySanitizerTrackOrigins));
}
static void addThreadSanitizerPass(const PassManagerBuilder &Builder,