[PATCH] D24426: DebugInfo: Pass non-zero alignment to DIBuilder only if aligment was forced

Paul Robinson via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 12 17:00:03 PDT 2016


probinson added a subscriber: probinson.

================
Comment at: lib/CodeGen/CGDebugInfo.cpp:3691
@@ -3635,1 +3690,3 @@
+  if (D->hasAttr<AlignedAttr>())
+    AlignInBits = D->getMaxAlignment();
   StringRef DeclName, LinkageName;
----------------
dblaikie wrote:
> is max alignment the right thing here? Should it be min alignment?
> (is alignment in bits the desired thing across all of this too? It looked like in the backend patch there was some division by CHAR_BITS, etc?)
I should think bits is the right choice here; seems more the province of the backend to convert it into the appropriate addressable units (commonly but not universally chars).


https://reviews.llvm.org/D24426





More information about the cfe-commits mailing list