[PATCH] D21038: AMDGPU/AsmParser: Add support for parsing symbol operands

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 6 13:23:54 PDT 2016


arsenm added a comment.

I thought symbols usually had some special prefix character to distinguish them


================
Comment at: lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp:149
@@ +148,3 @@
+  StringRef getExpressionAsToken() const {
+    assert(isExpr());
+    const MCSymbolRefExpr *S = cast<MCSymbolRefExpr>(Expr);
----------------
This looks redundant with the cast<>

================
Comment at: lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp:1339
@@ +1338,3 @@
+    // If this identifier is a symbol, we want to create an expression for it.
+    // It is a little difficlut to distinguish between a symbol name, and
+    // an instruction flag like 'gds'.  In order to do this, we parse
----------------
Typo difficlut


http://reviews.llvm.org/D21038





More information about the llvm-commits mailing list