aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/CBackend
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/CBackend')
-rw-r--r--lib/Target/CBackend/CBackend.cpp4
-rw-r--r--lib/Target/CBackend/Writer.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp
index 645832c..bc2106d 100644
--- a/lib/Target/CBackend/CBackend.cpp
+++ b/lib/Target/CBackend/CBackend.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 << "(";
diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp
index 645832c..bc2106d 100644
--- a/lib/Target/CBackend/Writer.cpp
+++ b/lib/Target/CBackend/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 << "(";