fix CBackend/2005-09-27-VolatileFuncPtr.ll
authorChris Lattner <sabre@nondot.org>
Tue, 27 Sep 2005 20:52:44 +0000 (20:52 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 27 Sep 2005 20:52:44 +0000 (20:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23475 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/CBackend/CBackend.cpp
lib/Target/CBackend/Writer.cpp

index df06c7ca24de99702da670610d8cfa87f807cedf..8ff23b7008b5e7b0174c4998b530aeed300459b0 100644 (file)
@@ -1683,8 +1683,8 @@ void CWriter::visitLoadInst(LoadInst &I) {
   Out << '*';
   if (I.isVolatile()) {
     Out << "((";
-    printType(Out, I.getType());
-    Out << " volatile*)";
+    printType(Out, I.getType(), "volatile*");
+    Out << ")";
   }
 
   writeOperand(I.getOperand(0));
@@ -1697,8 +1697,8 @@ void CWriter::visitStoreInst(StoreInst &I) {
   Out << '*';
   if (I.isVolatile()) {
     Out << "((";
-    printType(Out, I.getOperand(0)->getType());
-    Out << " volatile*)";
+    printType(Out, I.getOperand(0)->getType(), " volatile*");
+    Out << ")";
   }
   writeOperand(I.getPointerOperand());
   if (I.isVolatile()) Out << ')';
index df06c7ca24de99702da670610d8cfa87f807cedf..8ff23b7008b5e7b0174c4998b530aeed300459b0 100644 (file)
@@ -1683,8 +1683,8 @@ void CWriter::visitLoadInst(LoadInst &I) {
   Out << '*';
   if (I.isVolatile()) {
     Out << "((";
-    printType(Out, I.getType());
-    Out << " volatile*)";
+    printType(Out, I.getType(), "volatile*");
+    Out << ")";
   }
 
   writeOperand(I.getOperand(0));
@@ -1697,8 +1697,8 @@ void CWriter::visitStoreInst(StoreInst &I) {
   Out << '*';
   if (I.isVolatile()) {
     Out << "((";
-    printType(Out, I.getOperand(0)->getType());
-    Out << " volatile*)";
+    printType(Out, I.getOperand(0)->getType(), " volatile*");
+    Out << ")";
   }
   writeOperand(I.getPointerOperand());
   if (I.isVolatile()) Out << ')';