[PATCH] D78419: [X86][MC][NFC] Reduce the parameters of functions in X86MCCodeEmitter(Part III)

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 18 12:22:27 PDT 2020


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp:1388
 
-  // Keep track of the current byte being emitted.
-  unsigned CurByte = 0;
+  unsigned StartByte = OS.tell();
 
----------------
tell() returns a uint64_t and since you can't know how the encoder is being called, I think you have to assume you might have more than 2^32 bytes in the stream already.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78419/new/

https://reviews.llvm.org/D78419





More information about the llvm-commits mailing list