From 40d2aeb28f3790fb5d1b95bb35f65ab922b431a7 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 2 Dec 2003 17:43:55 +0000 Subject: [PATCH] Finegrainify namespacification Fix regressions ScalarRepl/basictest.ll & arraytest.ll llvm-svn: 10287 --- llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp index e374ccc7a2ad..c1c4759eb98c 100644 --- a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp +++ b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp @@ -32,8 +32,7 @@ #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"); @@ -65,7 +64,7 @@ namespace { } // Public interface to the ScalarReplAggregates pass -Pass *createScalarReplAggregatesPass() { return new SROA(); } +Pass *llvm::createScalarReplAggregatesPass() { return new SROA(); } bool SROA::runOnFunction(Function &F) { @@ -234,7 +233,7 @@ bool SROA::isSafeUseOfAllocation(Instruction *User) { return false; ++I; - if (I != E || !isa(I.getOperand())) + if (I == E || !isa(I.getOperand())) return false; // If this is a use of an array allocation, do a bit more checking for sanity. @@ -301,5 +300,3 @@ bool SROA::isSafeAllocaToPromote(AllocationInst *AI) { } return true; } - -} // End llvm namespace