summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorArnaud A. de Grandmaison <arnaud.degrandmaison@arm.com>2014-07-21 19:47:02 +0000
committerArnaud A. de Grandmaison <arnaud.degrandmaison@arm.com>2014-07-21 19:47:02 +0000
commit6e24a465721c8c919c3f16402e7e756dd2a47a8d (patch)
tree733d6ec1d2e6b33ba3a85ebb0884279e674b0749 /clang/lib/CodeGen/CGExpr.cpp
parent63a2d07f716e3f308da87d5aae1fb945aee034eb (diff)
downloadbcm5719-llvm-6e24a465721c8c919c3f16402e7e756dd2a47a8d.tar.gz
bcm5719-llvm-6e24a465721c8c919c3f16402e7e756dd2a47a8d.zip
Revert "Emit lifetime.start / lifetime.end markers for unnamed temporary objects."
This commit did break the sanitizer-x86 bot. Revert it while investigating. llvm-svn: 213579
Diffstat (limited to 'clang/lib/CodeGen/CGExpr.cpp')
-rw-r--r--clang/lib/CodeGen/CGExpr.cpp25
1 files changed, 0 insertions, 25 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index 2c9c2f130e8..512b323ba10 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/lib/CodeGen/CGExpr.cpp
@@ -353,17 +353,6 @@ LValue CodeGenFunction::EmitMaterializeTemporaryExpr(
// Create and initialize the reference temporary.
llvm::Value *Object = createReferenceTemporary(*this, M, E);
-
- uint64_t size =
- CGM.getDataLayout().getTypeStoreSize(ConvertTypeForMem(E->getType()));
- llvm::Value *sizeV = nullptr;
- llvm::AllocaInst *Alloca = dyn_cast<llvm::AllocaInst>(Object);
- bool useLifetimeMarkers = Alloca && shouldUseLifetimeMarkers(size);
- if (useLifetimeMarkers) {
- sizeV = llvm::ConstantInt::get(Int64Ty, size);
- EmitLifetimeStart(sizeV, Object);
- }
-
if (auto *Var = dyn_cast<llvm::GlobalVariable>(Object)) {
// If the temporary is a global and has a constant initializer, we may
// have already initialized it.
@@ -374,20 +363,6 @@ LValue CodeGenFunction::EmitMaterializeTemporaryExpr(
} else {
EmitAnyExprToMem(E, Object, Qualifiers(), /*IsInit*/true);
}
-
- if (useLifetimeMarkers)
- switch (M->getStorageDuration()) {
- case SD_FullExpression:
- EHStack.pushCleanup<CallLifetimeEnd>(NormalAndEHCleanup, Object, sizeV);
- break;
- case SD_Automatic:
- pushCleanupAfterFullExpr<CallLifetimeEnd>(NormalAndEHCleanup, Object,
- sizeV);
- break;
- default:
- llvm_unreachable("unexpected storage duration for Lifetime markers");
- }
-
pushTemporaryCleanup(*this, M, E, Object);
// Perform derived-to-base casts and/or field accesses, to get from the
OpenPOWER on IntegriCloud