[llvm] r362592 - [IPO] Disabled 'default only' switch statements to fix MSVC warnings.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 5 03:04:06 PDT 2019


Author: rksimon
Date: Wed Jun  5 03:04:05 2019
New Revision: 362592

URL: http://llvm.org/viewvc/llvm-project?rev=362592&view=rev
Log:
[IPO] Disabled 'default only' switch statements to fix MSVC warnings.

@jdoerfert Looks like these are placeholders for incoming abstract attributes patches so I've just commented the code out, even though this is usually frowned upon.

Modified:
    llvm/trunk/lib/Transforms/IPO/Attributor.cpp

Modified: llvm/trunk/lib/Transforms/IPO/Attributor.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/Attributor.cpp?rev=362592&r1=362591&r2=362592&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/Attributor.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/Attributor.cpp Wed Jun  5 03:04:05 2019
@@ -86,10 +86,10 @@ static void bookkeeping(AbstractAttribut
 
   if (!Attr.isEnumAttribute())
     return;
-  switch (Attr.getKindAsEnum()) {
-  default:
-    return;
-  }
+  //switch (Attr.getKindAsEnum()) {
+  //default:
+  //  return;
+  //}
 }
 
 /// Helper to identify the correct offset into an attribute list.
@@ -397,10 +397,10 @@ void Attributor::identifyDefaultAbstract
     // to concrete attributes we only cache the ones that are as identified in
     // the following switch.
     // Note: There are no concrete attributes now so this is initially empty.
-    switch (I.getOpcode()) {
-    default:
-      break;
-    }
+    //switch (I.getOpcode()) {
+    //default:
+    //  break;
+    //}
     if (IsInterestingOpcode)
       InstOpcodeMap[I.getOpcode()].push_back(&I);
     if (I.mayReadOrWriteMemory())




More information about the llvm-commits mailing list