[cfe-commits] r39655 - /cfe/cfe/trunk/CodeGen/CGExpr.cpp

clattner at cs.uiuc.edu clattner at cs.uiuc.edu
Wed Jul 11 09:46:43 PDT 2007


Author: clattner
Date: Wed Jul 11 11:46:42 2007
New Revision: 39655

URL: http://llvm.org/viewvc/llvm-project?rev=39655&view=rev
Log:
Fix a nasty bug which caused infinite recursion

Modified:
    cfe/cfe/trunk/CodeGen/CGExpr.cpp

Modified: cfe/cfe/trunk/CodeGen/CGExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/CodeGen/CGExpr.cpp?rev=39655&r1=39654&r2=39655&view=diff

==============================================================================
--- cfe/cfe/trunk/CodeGen/CGExpr.cpp (original)
+++ cfe/cfe/trunk/CodeGen/CGExpr.cpp Wed Jul 11 11:46:42 2007
@@ -456,13 +456,13 @@
 RValue CodeGenFunction::EmitUnaryPlus(const UnaryOperator *E) {
   // Unary plus just performs promotions on its arithmetic operand.
   QualType Ty;
-  return EmitExprWithUsualUnaryConversions(E, Ty);
+  return EmitExprWithUsualUnaryConversions(E->getSubExpr(), Ty);
 }
 
 RValue CodeGenFunction::EmitUnaryMinus(const UnaryOperator *E) {
   // Unary minus performs promotions, then negates its arithmetic operand.
   QualType Ty;
-  RValue V = EmitExprWithUsualUnaryConversions(E, Ty);
+  RValue V = EmitExprWithUsualUnaryConversions(E->getSubExpr(), Ty);
   
   if (V.isScalar())
     return RValue::get(Builder.CreateNeg(V.getVal(), "neg"));
@@ -473,7 +473,7 @@
 RValue CodeGenFunction::EmitUnaryNot(const UnaryOperator *E) {
   // Unary not performs promotions, then complements its integer operand.
   QualType Ty;
-  RValue V = EmitExprWithUsualUnaryConversions(E, Ty);
+  RValue V = EmitExprWithUsualUnaryConversions(E->getSubExpr(), Ty);
   
   if (V.isScalar())
     return RValue::get(Builder.CreateNot(V.getVal(), "neg"));





More information about the cfe-commits mailing list