projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f405280
)
Do not dereference end iterators. It's really bad for the asmwriter's health.
author
Chris Lattner
<sabre@nondot.org>
Tue, 15 Jun 2004 21:07:32 +0000
(21:07 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Tue, 15 Jun 2004 21:07:32 +0000
(21:07 +0000)
This possibly fixes PR370
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14181
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/AsmWriter.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/AsmWriter.cpp
b/lib/VMCore/AsmWriter.cpp
index 3484d3976e3c48c1b839d5d77706ce5a287389b4..570d5b3d4f30454eff3a7f3d87674b92b12487ca 100644
(file)
--- a/
lib/VMCore/AsmWriter.cpp
+++ b/
lib/VMCore/AsmWriter.cpp
@@
-1324,7
+1324,10
@@
int SlotMachine::getSlot(const Value *V) {
// Return the slot number as the module's contribution to
// the type plane plus the index in the function's contribution
// to the type plane.
- return MI->second.next_slot + FVI->second;
+ if (MI != mMap.end())
+ return MI->second.next_slot + FVI->second;
+ else
+ return FVI->second;
}
}
}