forked from OSchip/llvm-project
BinaryFunction.h: Clarify commet for getSize(), add getNumNonPseudos()
Summary: Minor fix and add new function (cherry picked from FBD5270376)
This commit is contained in:
parent
dc4dd64800
commit
37d0f81df5
|
@ -1093,7 +1093,7 @@ public:
|
|||
return FileOffset;
|
||||
}
|
||||
|
||||
/// Return (original) size of the function.
|
||||
/// Return (original) byte size of the function.
|
||||
uint64_t getSize() const {
|
||||
return Size;
|
||||
}
|
||||
|
@ -1103,6 +1103,15 @@ public:
|
|||
return MaxSize;
|
||||
}
|
||||
|
||||
/// Return the number of emitted instructions for this function.
|
||||
uint32_t getNumNonPseudos() const {
|
||||
uint32_t N = 0;
|
||||
for (auto &BB : layout()) {
|
||||
N += BB->getNumNonPseudos();
|
||||
}
|
||||
return N;
|
||||
}
|
||||
|
||||
/// Return MC symbol associated with the function.
|
||||
/// All references to the function should use this symbol.
|
||||
MCSymbol *getSymbol() {
|
||||
|
|
Loading…
Reference in New Issue