[llvm-commits] CVS: llvm/lib/CWriter/Writer.cpp

Nicholas Hildenbrandt hldnbrnd at cs.uiuc.edu
Thu Oct 3 15:48:00 PDT 2002


Changes in directory llvm/lib/CWriter:

Writer.cpp updated: 1.59 -> 1.60

---
Log message:

Add parens around constant calls to getelemptr to properly associate the reference


---
Diffs of the changes:

Index: llvm/lib/CWriter/Writer.cpp
diff -u llvm/lib/CWriter/Writer.cpp:1.59 llvm/lib/CWriter/Writer.cpp:1.60
--- llvm/lib/CWriter/Writer.cpp:1.59	Wed Oct  2 16:14:33 2002
+++ llvm/lib/CWriter/Writer.cpp	Thu Oct  3 15:47:24 2002
@@ -337,10 +337,10 @@
       return;
 
     case Instruction::GetElementPtr:
-      Out << "&(";
+      Out << "(&(";
       printIndexingExpression(CPV->getOperand(0),
                               CPV->op_begin()+1, CPV->op_end());
-      Out << ")";
+      Out << "))";
       return;
     case Instruction::Add:
       Out << "(";





More information about the llvm-commits mailing list