[PATCH] D36508: [ELF] - Linkerscript: Add `~` as separate math token.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 11 01:24:41 PDT 2017


grimar updated this revision to Diff 118556.
grimar edited the summary of this revision.

https://reviews.llvm.org/D36508

Files:
  ELF/ScriptLexer.cpp
  test/ELF/linkerscript/symbol-assignexpr.s


Index: test/ELF/linkerscript/symbol-assignexpr.s
===================================================================
--- test/ELF/linkerscript/symbol-assignexpr.s
+++ test/ELF/linkerscript/symbol-assignexpr.s
@@ -6,7 +6,7 @@
 # RUN:         symbol2 = symbol + 0x1234; \
 # RUN:         symbol3 = symbol2; \
 # RUN:         symbol4 = symbol + -4; \
-# RUN:         symbol5 = symbol - ~ 0xfffb; \
+# RUN:         symbol5 = symbol - ~0xfffb; \
 # RUN:         symbol6 = symbol - ~(0xfff0 + 0xb); \
 # RUN:         symbol7 = symbol - ~ 0xfffb + 4; \
 # RUN:         symbol8 = ~ 0xffff + 4; \
Index: ELF/ScriptLexer.cpp
===================================================================
--- ELF/ScriptLexer.cpp
+++ ELF/ScriptLexer.cpp
@@ -164,7 +164,7 @@
 // Split a given string as an expression.
 // This function returns "3", "*" and "5" for "3*5" for example.
 static std::vector<StringRef> tokenizeExpr(StringRef S) {
-  StringRef Ops = "+-*/:!"; // List of operators
+  StringRef Ops = "+-*/:!~"; // List of operators
 
   // Quoted strings are literal strings, so we don't want to split it.
   if (S.startswith("\""))


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36508.118556.patch
Type: text/x-patch
Size: 1121 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171011/cdef4607/attachment.bin>


More information about the llvm-commits mailing list