diff options
author | Tim Northover <tnorthover@apple.com> | 2014-06-13 09:14:50 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2014-06-13 09:14:50 +0000 |
commit | 24fe2322a2b8e92bf56515af80fdfe07c28ced5c (patch) | |
tree | b72c6c1a35be512d338220b71f1555dfab385ba8 /llvm/lib/Target/CppBackend/CPPBackend.cpp | |
parent | b5e596f7c3cc5b1056780dc7c27932eb7d04c443 (diff) | |
download | bcm5719-llvm-24fe2322a2b8e92bf56515af80fdfe07c28ced5c.tar.gz bcm5719-llvm-24fe2322a2b8e92bf56515af80fdfe07c28ced5c.zip |
CPP backend: set volatile property on atomic instructions.
llvm-svn: 210890
Diffstat (limited to 'llvm/lib/Target/CppBackend/CPPBackend.cpp')
-rw-r--r-- | llvm/lib/Target/CppBackend/CPPBackend.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/CppBackend/CPPBackend.cpp b/llvm/lib/Target/CppBackend/CPPBackend.cpp index 15b574dd368..7f822b67945 100644 --- a/llvm/lib/Target/CppBackend/CPPBackend.cpp +++ b/llvm/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: { |