diff options
author | Nick Hildenbrandt <hldnbrnd@uiuc.edu> | 2002-10-03 20:47:24 +0000 |
---|---|---|
committer | Nick Hildenbrandt <hldnbrnd@uiuc.edu> | 2002-10-03 20:47:24 +0000 |
commit | afff0a25b7609cec95dd366183507b062da72ef6 (patch) | |
tree | 8b00d0ebceb7614e4f3b1b1878fcfe56ffeb336f /llvm/lib | |
parent | c9c681e4f5a61d65ef58d891fb01ef2ac9087651 (diff) | |
download | bcm5719-llvm-afff0a25b7609cec95dd366183507b062da72ef6.tar.gz bcm5719-llvm-afff0a25b7609cec95dd366183507b062da72ef6.zip |
Add parens around constant calls to getelemptr to properly associate the reference
llvm-svn: 4032
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CWriter/Writer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CWriter/Writer.cpp b/llvm/lib/CWriter/Writer.cpp index 645832cd359..bc2106d78fe 100644 --- a/llvm/lib/CWriter/Writer.cpp +++ b/llvm/lib/CWriter/Writer.cpp @@ -337,10 +337,10 @@ void CWriter::printConstant(Constant *CPV) { return; case Instruction::GetElementPtr: - Out << "&("; + Out << "(&("; printIndexingExpression(CPV->getOperand(0), CPV->op_begin()+1, CPV->op_end()); - Out << ")"; + Out << "))"; return; case Instruction::Add: Out << "("; |