[llvm-bugs] [Bug 27451] New: Clang doesn't add LLVM lifetime markers for temporaries created by lifetime extension
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Apr 21 13:17:00 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27451
Bug ID: 27451
Summary: Clang doesn't add LLVM lifetime markers for
temporaries created by lifetime extension
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
Assignee: unassignedclangbugs at nondot.org
Reporter: timshen91 at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
// RUN: clang++ -O2 -S -emit-llvm -fno-exceptions -std=c++11 %s -o - |
FileCheck %s
// CHECK: @llvm.lifetime.start
#include <string>
extern void Bar(const std::string&);
void Foo() {
// Both string objects should share the same stack slot, but they don't.
{
const std::string& v = {"asdf"};
Bar(v);
}
{
const std::string& v = {"adsf"};
Bar(v);
}
}
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160421/9b888cd0/attachment.html>
More information about the llvm-bugs
mailing list