From d5d864b553f051ea58d072b0300efe7efb55ec03 Mon Sep 17 00:00:00 2001 From: Tim Northover Date: Fri, 13 Jun 2014 09:14:50 +0000 Subject: CPP backend: set volatile property on atomic instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210890 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/CppBackend/CPPBackend.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/Target/CppBackend') diff --git a/lib/Target/CppBackend/CPPBackend.cpp b/lib/Target/CppBackend/CPPBackend.cpp index 15b574dd36..7f822b6794 100644 --- a/lib/Target/CppBackend/CPPBackend.cpp +++ b/lib/Target/CppBackend/CPPBackend.cpp @@ -1577,6 +1577,8 @@ void CppWriter::printInstruction(const Instruction *I, nl(Out) << iName << "->setName(\""; printEscapedString(cxi->getName()); Out << "\");"; + nl(Out) << iName << "->setVolatile(" + << (cxi->isVolatile() ? "true" : "false") << ");"; break; } case Instruction::AtomicRMW: { @@ -1607,6 +1609,8 @@ void CppWriter::printInstruction(const Instruction *I, nl(Out) << iName << "->setName(\""; printEscapedString(rmwi->getName()); Out << "\");"; + nl(Out) << iName << "->setVolatile(" + << (rmwi->isVolatile() ? "true" : "false") << ");"; break; } case Instruction::LandingPad: { -- cgit v1.2.3