summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2017-01-06 23:18:09 +0000
committerMehdi Amini <mehdi.amini@apple.com>2017-01-06 23:18:09 +0000
commit7f873070c4b60ed1854caea29788603a630c4621 (patch)
tree9e8b6dd6d8c2ee6986a518377d5ee191753c8e45 /clang/lib/CodeGen/CodeGenFunction.cpp
parent25657e8c5d47e2bf9a79c265b47e8f8906b9882f (diff)
downloadbcm5719-llvm-7f873070c4b60ed1854caea29788603a630c4621.tar.gz
bcm5719-llvm-7f873070c4b60ed1854caea29788603a630c4621.zip
Add a cc1 option to force disabling lifetime-markers emission from clang
Summary: This intended as a debugging/development flag only. Differential Revision: https://reviews.llvm.org/D28385 llvm-svn: 291300
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index 7cab13de923..137c69420dd 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/lib/CodeGen/CodeGenFunction.cpp
@@ -42,6 +42,9 @@ using namespace CodeGen;
/// markers.
static bool shouldEmitLifetimeMarkers(const CodeGenOptions &CGOpts,
const LangOptions &LangOpts) {
+ if (CGOpts.DisableLifetimeMarkers)
+ return false;
+
// Asan uses markers for use-after-scope checks.
if (CGOpts.SanitizeAddressUseAfterScope)
return true;
OpenPOWER on IntegriCloud