[PATCH] D79625: [PowerPC] Extend .reloc directive on PowerPC

Stefan Pintilie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 11 14:20:29 PDT 2020


stefanp marked 3 inline comments as done.
stefanp added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.cpp:126
+  switch(BinExpr.getOpcode()) {
+  default:
+    // Other opcodes are not supported.
----------------
anil9 wrote:
> Indentation.
It seems that clang-format thinks this is fine.
I checked what we did in other places in llvm/lib/Target/PowerPC/ and we seem to use both formats. Unless we can find a really compelling reason to change this I'm going to leave it as-is.


================
Comment at: llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.cpp:155
+  switch(Offset.getKind()) {
+  case MCExpr::Binary: {
+    const MCBinaryExpr &BinExpr = cast<const MCBinaryExpr>(Offset);
----------------
anil9 wrote:
> Indentation.
Again, I think this is fine since clang-format thinks it is fine.


================
Comment at: llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.cpp:162
+
+    assert(DF && "Expected a valid data fragment.");
+
----------------
anil9 wrote:
> will this assertion be reached given the break just before it ?
The `break` is only triggered if the if statement is true. If `!getOffsetFromBinaryExpr(BinExpr, ComputedOffset, &DF)` is false we don't break.


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

https://reviews.llvm.org/D79625





More information about the llvm-commits mailing list