[PATCH] D15952: AMDGPU/SI: Emit global variable sizes when targeting HSA

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 7 10:48:29 PST 2016


arsenm accepted this revision.
arsenm added a comment.
This revision is now accepted and ready to land.

LGTM


================
Comment at: lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp:156
@@ +155,3 @@
+  uint64_t Size = DL.getTypeAllocSize(GV->getType()->getElementType());
+  OutStreamer->emitELFSize(cast<MCSymbolELF>(GVSym),
+                           MCConstantExpr::create(Size, OutContext));
----------------
I think you should move this cast up to the getSymbol


http://reviews.llvm.org/D15952





More information about the llvm-commits mailing list