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:
4716cf4
)
Add a missing assertion, the null register has no register units.
author
Jakob Stoklund Olesen
<stoklund@2pi.dk>
Fri, 21 Dec 2012 18:38:09 +0000
(18:38 +0000)
committer
Jakob Stoklund Olesen
<stoklund@2pi.dk>
Fri, 21 Dec 2012 18:38:09 +0000
(18:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170916
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/MC/MCRegisterInfo.h
patch
|
blob
|
history
diff --git
a/include/llvm/MC/MCRegisterInfo.h
b/include/llvm/MC/MCRegisterInfo.h
index 1fe870ed14286e6b4b9800f4044361955ad8016b..f5b4dddc5198a361df9d98a4ef9eb456cffebc0f 100644
(file)
--- a/
include/llvm/MC/MCRegisterInfo.h
+++ b/
include/llvm/MC/MCRegisterInfo.h
@@
-479,6
+479,7
@@
public:
/// MCRegUnitIterator - Create an iterator that traverses the register units
/// in Reg.
MCRegUnitIterator(unsigned Reg, const MCRegisterInfo *MCRI) {
+ assert(Reg && "Null register has no regunits");
// Decode the RegUnits MCRegisterDesc field.
unsigned RU = MCRI->get(Reg).RegUnits;
unsigned Scale = RU & 15;