BinaryFunction.h: Clarify commet for getSize(), add getNumNonPseudos()

Summary: Minor fix and add new function

(cherry picked from FBD5270376)
This commit is contained in:
Yue Zhao 2017-06-16 17:06:13 -07:00 committed by Maksim Panchenko
parent dc4dd64800
commit 37d0f81df5
1 changed files with 10 additions and 1 deletions

View File

@ -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() {