diff options
author | Mark Seaborn <mseaborn@chromium.org> | 2013-06-26 16:54:09 -0700 |
---|---|---|
committer | Mark Seaborn <mseaborn@chromium.org> | 2013-06-26 16:54:09 -0700 |
commit | 359669b6c4987eda3a7a177c67c906af56f8bb73 (patch) | |
tree | 30547ddc41329a14ddd93a6207273e86772b6028 /lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | dc80ae361ec894a266815c078d92c78233acf542 (diff) |
PNaCl pexe reader: Remove now-unused Type argument from getValue()/popValue()
Before this change, NaClBitcodeReader had some icky use of C++
function overloading and reference types. Whether getValue() modified
its Slot argument depended on whether it was passed a Type argument,
which wasn't very readable:
// Modifies Slot.
bool getValue(SmallVector<uint64_t, 64> &Record, unsigned &Slot,
unsigned InstNum, Value *&ResVal);
// Does not modify Slot.
bool getValue(SmallVector<uint64_t, 64> &Record, unsigned Slot,
unsigned InstNum, Type *Ty, Value *&ResVal);
// Does not modify Slot.
Value *getValue(SmallVector<uint64_t, 64> &Record, unsigned Slot,
unsigned InstNum, Type *Ty);
So, do these cleanups:
* Convert non-const reference arguments to pointers. (Also add
"const" to the Record argument.)
* Remove the unused Type argument from getValue()/popValue().
* Remove the getValue() case that was identical to popValue(). Call
popValue() instead. Now popValue() modifies *Slot and getValue()
does not.
* Remove an unused getValue() case.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3507
TEST=PNaCl toolchain trybots
Review URL: https://codereview.chromium.org/17938002
Diffstat (limited to 'lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions