#include "Support/Debug.h"
#include "Support/Statistic.h"
#include "Support/StringExtras.h"
-
-namespace llvm {
+using namespace llvm;
namespace {
Statistic<> NumReplaced("scalarrepl", "Number of allocas broken up");
}
// Public interface to the ScalarReplAggregates pass
-Pass *createScalarReplAggregatesPass() { return new SROA(); }
+Pass *llvm::createScalarReplAggregatesPass() { return new SROA(); }
bool SROA::runOnFunction(Function &F) {
return false;
++I;
- if (I != E || !isa<ConstantInt>(I.getOperand()))
+ if (I == E || !isa<ConstantInt>(I.getOperand()))
return false;
// If this is a use of an array allocation, do a bit more checking for sanity.
}
return true;
}
-
-} // End llvm namespace