[PATCH] D64156: Make joined instances of JoinedOrSeparate flags point to the unaliased args, like all other arg types do

Phabricator via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 5 04:46:28 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL365186: Make joined instances of JoinedOrSeparate flags point to the unaliased argsā€¦ (authored by nico, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D64156?vs=207873&id=208146#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64156/new/

https://reviews.llvm.org/D64156

Files:
  cfe/trunk/lib/Driver/Driver.cpp
  lld/trunk/COFF/Driver.cpp
  lld/trunk/ELF/Driver.cpp
  lld/trunk/ELF/DriverUtils.cpp
  lld/trunk/MinGW/Driver.cpp
  lld/trunk/wasm/Driver.cpp
  llvm/trunk/lib/Option/Option.cpp


Index: lld/trunk/MinGW/Driver.cpp
===================================================================
--- lld/trunk/MinGW/Driver.cpp
+++ lld/trunk/MinGW/Driver.cpp
@@ -313,7 +313,7 @@
   StringRef Prefix = "";
   bool Static = false;
   for (auto *A : Args) {
-    switch (A->getOption().getUnaliasedOption().getID()) {
+    switch (A->getOption().getID()) {
     case OPT_INPUT:
       if (StringRef(A->getValue()).endswith_lower(".def"))
         Add("-def:" + StringRef(A->getValue()));
Index: lld/trunk/COFF/Driver.cpp
===================================================================
--- lld/trunk/COFF/Driver.cpp
+++ lld/trunk/COFF/Driver.cpp
@@ -332,7 +332,7 @@
   }
 
   for (auto *Arg : Args) {
-    switch (Arg->getOption().getUnaliasedOption().getID()) {
+    switch (Arg->getOption().getID()) {
     case OPT_aligncomm:
       parseAligncomm(Arg->getValue());
       break;
Index: lld/trunk/wasm/Driver.cpp
===================================================================
--- lld/trunk/wasm/Driver.cpp
+++ lld/trunk/wasm/Driver.cpp
@@ -271,7 +271,7 @@
 
 void LinkerDriver::createFiles(opt::InputArgList &Args) {
   for (auto *Arg : Args) {
-    switch (Arg->getOption().getUnaliasedOption().getID()) {
+    switch (Arg->getOption().getID()) {
     case OPT_l:
       addLibrary(Arg->getValue());
       break;
@@ -531,7 +531,7 @@
 
   // Copy the command line to the output while rewriting paths.
   for (auto *Arg : Args) {
-    switch (Arg->getOption().getUnaliasedOption().getID()) {
+    switch (Arg->getOption().getID()) {
     case OPT_reproduce:
       break;
     case OPT_INPUT:
Index: lld/trunk/ELF/Driver.cpp
===================================================================
--- lld/trunk/ELF/Driver.cpp
+++ lld/trunk/ELF/Driver.cpp
@@ -1112,7 +1112,7 @@
 
   // Iterate over argv to process input files and positional arguments.
   for (auto *Arg : Args) {
-    switch (Arg->getOption().getUnaliasedOption().getID()) {
+    switch (Arg->getOption().getID()) {
     case OPT_library:
       addLibrary(Arg->getValue());
       break;
Index: lld/trunk/ELF/DriverUtils.cpp
===================================================================
--- lld/trunk/ELF/DriverUtils.cpp
+++ lld/trunk/ELF/DriverUtils.cpp
@@ -172,7 +172,7 @@
 
   // Copy the command line to the output while rewriting paths.
   for (auto *Arg : Args) {
-    switch (Arg->getOption().getUnaliasedOption().getID()) {
+    switch (Arg->getOption().getID()) {
     case OPT_reproduce:
       break;
     case OPT_INPUT:
Index: llvm/trunk/lib/Option/Option.cpp
===================================================================
--- llvm/trunk/lib/Option/Option.cpp
+++ llvm/trunk/lib/Option/Option.cpp
@@ -207,7 +207,7 @@
     // FIXME: Avoid strlen.
     if (ArgSize != strlen(Args.getArgString(Index))) {
       const char *Value = Args.getArgString(Index) + ArgSize;
-      return new Arg(*this, Spelling, Index++, Value);
+      return new Arg(UnaliasedOption, Spelling, Index++, Value);
     }
 
     // Otherwise it must be separate.
Index: cfe/trunk/lib/Driver/Driver.cpp
===================================================================
--- cfe/trunk/lib/Driver/Driver.cpp
+++ cfe/trunk/lib/Driver/Driver.cpp
@@ -2180,7 +2180,7 @@
         Diag(clang::diag::err_drv_unknown_language) << A->getValue();
         InputType = types::TY_Object;
       }
-    } else if (A->getOption().getID() == options::OPT__SLASH_U) {
+    } else if (A->getOption().getID() == options::OPT_U) {
       assert(A->getNumValues() == 1 && "The /U option has one value.");
       StringRef Val = A->getValue(0);
       if (Val.find_first_of("/\\") != StringRef::npos) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64156.208146.patch
Type: text/x-patch
Size: 3653 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190705/f5ca6941/attachment-0001.bin>


More information about the cfe-commits mailing list