[PATCH] D41832: LLParser: Do not check alloca addr space if the assembly does not contain data layout definition

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 8 12:39:23 PST 2018


arsenm added inline comments.


================
Comment at: lib/AsmParser/LLParser.cpp:6181-6185
+    if (AS != AddrSpace) {
+      // TODO: In the future it should be possible to specify addrspace
+      // per-alloca.
+      return Error(ASLoc, "address space must match datalayout");
+    }
----------------
yaxunl wrote:
> arsenm wrote:
> > The idea was to remove this check from the parser entirely
> Removing this check will cause some lit tests to fail since the verifier output different error messages.
> 
> The error message from the parser is better since it contains line/column number. Should we keep the check if the assembly contains data layout definition?
I think that's less important. The verifier error will dump the instruction so it's not difficult to find anyway. I think changing the error depending on whether the datalayout is in the module already would be inconsistent


https://reviews.llvm.org/D41832





More information about the llvm-commits mailing list