diff options
author | Chris Lattner <sabre@nondot.org> | 2003-12-02 17:43:55 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-12-02 17:43:55 +0000 |
commit | d8664730942beb911327336d1f9db8e7efcd6813 (patch) | |
tree | 671f3a73db6c9164422982ebc978c069765b41f5 /lib/Transforms/Scalar | |
parent | 59e47e3ee10840beb57ece10af04a6f9bf3495e9 (diff) | |
download | external_llvm-d8664730942beb911327336d1f9db8e7efcd6813.zip external_llvm-d8664730942beb911327336d1f9db8e7efcd6813.tar.gz external_llvm-d8664730942beb911327336d1f9db8e7efcd6813.tar.bz2 |
Finegrainify namespacification
Fix regressions ScalarRepl/basictest.ll & arraytest.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10287 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar')
-rw-r--r-- | lib/Transforms/Scalar/ScalarReplAggregates.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/lib/Transforms/Scalar/ScalarReplAggregates.cpp index e374ccc..c1c4759 100644 --- a/lib/Transforms/Scalar/ScalarReplAggregates.cpp +++ b/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<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. @@ -301,5 +300,3 @@ bool SROA::isSafeAllocaToPromote(AllocationInst *AI) { } return true; } - -} // End llvm namespace |