summaryrefslogtreecommitdiff
path: root/lib/Target/CppBackend
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2014-06-13 09:14:50 +0000
committerTim Northover <tnorthover@apple.com>2014-06-13 09:14:50 +0000
commitd5d864b553f051ea58d072b0300efe7efb55ec03 (patch)
tree075051d3ce451dc20f7b5fe15c6b1fa67473a0e1 /lib/Target/CppBackend
parenta19c2d4a6d5e8849dd2d21f0a2653ae9f85d2d22 (diff)
downloadllvm-d5d864b553f051ea58d072b0300efe7efb55ec03.tar.gz
llvm-d5d864b553f051ea58d072b0300efe7efb55ec03.tar.bz2
llvm-d5d864b553f051ea58d072b0300efe7efb55ec03.tar.xz
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
Diffstat (limited to 'lib/Target/CppBackend')
-rw-r--r--lib/Target/CppBackend/CPPBackend.cpp4
1 files changed, 4 insertions, 0 deletions
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: {