diff options
author | Chuck Rose III <cfr@adobe.com> | 2007-07-27 18:26:35 +0000 |
---|---|---|
committer | Chuck Rose III <cfr@adobe.com> | 2007-07-27 18:26:35 +0000 |
commit | 936baaa5aeddb78ff41b1f655101b4d88c47473b (patch) | |
tree | bdb4bb7687a121daf32ab68e13ac0f16da72bc78 /lib/Transforms/Scalar/LoopUnswitch.cpp | |
parent | 7c2c2e71edf27bd23fd37eb479caa6abf5a2c9cc (diff) |
VStudio compiler errors and placing Function*->ExFunc map under ManagedStatic control.
This commit fixes two things. One is a pair of VStudio compiler errors stemming from variables
which defined within the for loop statement and also within the body of the for loop. I fixed these
by renaming one of the two variables. Additionally, I've made the Function*->ExFunc map in
ExternalFunctions.cpp a ManagedStatic object, so that cleanup will be done on llvm_shutdown. In repeated
uses of the interpreter, where the same Function* address may get used for completely differnet functions,
this was causing a crash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40558 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopUnswitch.cpp')
-rw-r--r-- | lib/Transforms/Scalar/LoopUnswitch.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/Scalar/LoopUnswitch.cpp b/lib/Transforms/Scalar/LoopUnswitch.cpp index 5caf01cf10..3ef6376899 100644 --- a/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/lib/Transforms/Scalar/LoopUnswitch.cpp @@ -482,9 +482,9 @@ void CloneDomInfo(BasicBlock *NewBB, BasicBlock *Orig, for (DominanceFrontier::DomSetType::iterator I = S.begin(), E = S.end(); I != E; ++I) { BasicBlock *BB = *I; - DenseMap<const Value*, Value*>::iterator I = VM.find(BB); - if (I != VM.end()) - NewDFSet.insert(cast<BasicBlock>(I->second)); + DenseMap<const Value*, Value*>::iterator IDM = VM.find(BB); + if (IDM != VM.end()) + NewDFSet.insert(cast<BasicBlock>(IDM->second)); else NewDFSet.insert(BB); } |