Add support for volatile loads/stores

llvm-svn: 8393
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp
index b9b2e8f..f849fe1 100644
--- a/llvm/lib/VMCore/AsmWriter.cpp
+++ b/llvm/lib/VMCore/AsmWriter.cpp
@@ -771,6 +771,11 @@
   if (I.hasName())
     Out << getLLVMName(I.getName()) << " = ";
 
+  // If this is a volatile load or store, print out the volatile marker
+  if ((isa<LoadInst>(I)  && cast<LoadInst>(I).isVolatile()) ||
+      (isa<StoreInst>(I) && cast<StoreInst>(I).isVolatile()))
+      Out << "volatile ";
+
   // Print out the opcode...
   Out << I.getOpcodeName();