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

Doerfert, Johannes via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 5 06:20:28 PDT 2019


Simon, thanks for fixing this right away!

I should have seen this coming. I'll uncomment when I'll add attributes, which should be very soon.

Cheers,
  Johannes

________________________________________
From: llvm-commits <llvm-commits-bounces at lists.llvm.org> on behalf of Simon Pilgrim via llvm-commits <llvm-commits at lists.llvm.org>
Sent: Wednesday, June 5, 2019 05:04
To: llvm-commits at lists.llvm.org
Subject: [llvm] r362592 - [IPO] Disabled 'default only' switch statements to fix MSVC warnings.

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())


_______________________________________________
llvm-commits mailing list
llvm-commits at lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list