summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/Expressions.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-01-20 22:54:45 +0000
committerChris Lattner <sabre@nondot.org>2002-01-20 22:54:45 +0000
commit7f74a56e2436c40b18a672ad7d58727cd6832329 (patch)
tree6a4683a53f7eb71b8a3425008ef21268c2b2c8fd /llvm/lib/Analysis/Expressions.cpp
parent850d4f6af1a0e9de3fa6e10afb04e3738fcc5d67 (diff)
downloadbcm5719-llvm-7f74a56e2436c40b18a672ad7d58727cd6832329.tar.gz
bcm5719-llvm-7f74a56e2436c40b18a672ad7d58727cd6832329.zip
Changes to build successfully with GCC 3.02
llvm-svn: 1503
Diffstat (limited to 'llvm/lib/Analysis/Expressions.cpp')
-rw-r--r--llvm/lib/Analysis/Expressions.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/Expressions.cpp b/llvm/lib/Analysis/Expressions.cpp
index a35e37a9630..e94c7960596 100644
--- a/llvm/lib/Analysis/Expressions.cpp
+++ b/llvm/lib/Analysis/Expressions.cpp
@@ -11,6 +11,7 @@
#include "llvm/Optimizations/ConstantHandling.h"
#include "llvm/Method.h"
#include "llvm/BasicBlock.h"
+#include <iostream>
using namespace opt; // Get all the constant handling stuff
using namespace analysis;
@@ -178,7 +179,7 @@ inline const ConstantInt *operator*(const DefZero &L, const DefOne &R) {
static ExprType handleAddition(ExprType Left, ExprType Right, Value *V) {
const Type *Ty = V->getType();
if (Left.ExprTy > Right.ExprTy)
- swap(Left, Right); // Make left be simpler than right
+ std::swap(Left, Right); // Make left be simpler than right
switch (Left.ExprTy) {
case ExprType::Constant:
@@ -229,7 +230,7 @@ ExprType analysis::ClassifyExpression(Value *Expr) {
case Value::TypeVal: case Value::BasicBlockVal:
case Value::MethodVal: case Value::ModuleVal: default:
//assert(0 && "Unexpected expression type to classify!");
- cerr << "Bizarre thing to expr classify: " << Expr << endl;
+ std::cerr << "Bizarre thing to expr classify: " << Expr << "\n";
return Expr;
case Value::GlobalVariableVal: // Global Variable & Method argument:
case Value::MethodArgumentVal: // nothing known, return variable itself
@@ -280,7 +281,7 @@ ExprType analysis::ClassifyExpression(Value *Expr) {
ExprType Left (ClassifyExpression(I->getOperand(0)));
ExprType Right(ClassifyExpression(I->getOperand(1)));
if (Left.ExprTy > Right.ExprTy)
- swap(Left, Right); // Make left be simpler than right
+ std::swap(Left, Right); // Make left be simpler than right
if (Left.ExprTy != ExprType::Constant) // RHS must be > constant
return I; // Quadratic eqn! :(
OpenPOWER on IntegriCloud