[PATCH] D70461: [AIX] Emit TOC entries for ASM printing

David Tenty via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 26 11:45:09 PST 2019


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


================
Comment at: llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp:111
 
-  void emitTCEntry(const MCSymbol &S) override {
+  void emitTCEntry(const MCSymbol &Entry, const MCSymbol &Target) override {
+    const MCAsmInfo *MAI = Streamer.getContext().getAsmInfo();
----------------
jasonliu wrote:
> I'm on the fence of this interface change.
> I could see this interface change makes emitTCEntry a bit cleaner, and it models the TC entry a bit better: a symbol represent the real TC, and a symbol represent the item that TC is trying to store. 
> But on the other hand, I don't think we are ever getting ".tc A[TC], B", and we always have ".tc A[TC], A" (at least for now). Using the new interface would kinda make that implicit connection lost. 
If that relationship is something we want to preserve, we could add an assert of the form:

```
assert(Entry.getName().equals(MAI->getSymbolsHaveSMC() ? Target.getUnqualifiedName()  : Target.getName()) && "TOC entries should normally have the same name as their targets")
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70461





More information about the llvm-commits mailing list