[PATCH] D23280: COFF: handle /debugtype option
    Rui Ueyama via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Aug  8 14:04:16 PDT 2016
    
    
  
ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.
LGTM with a few nits.
================
Comment at: COFF/Config.h:66-71
@@ -65,2 +65,8 @@
 struct Configuration {
+  enum class DebugType {
+    None  = 0x0,
+    CV    = 0x1,  /// CodeView
+    PData = 0x2,  /// Procedure Data
+    Fixup = 0x4,  /// Relocation Table
+  };
   enum ManifestKind { SideBySide, Embed, No };
----------------
Let's move this enum class definition outside of Configuration so that we can write `DebugType::None` instead of `Configuration::DebugType::None`.
================
Comment at: COFF/Driver.cpp:300
@@ +299,3 @@
+  unsigned DebugTypes = static_cast<unsigned>(Configuration::DebugType::None);
+  for (auto Type : Types)
+    DebugTypes |=
----------------
`auto` -> `StringRef`
================
Comment at: COFF/Driver.cpp:302
@@ +301,3 @@
+    DebugTypes |=
+        llvm::StringSwitch<unsigned>(Type.lower())
+            .Case("cv", static_cast<unsigned>(Configuration::DebugType::CV))
----------------
Remove `llvm::` from this patch because we have `using namespace llvm`.
Repository:
  rL LLVM
https://reviews.llvm.org/D23280
    
    
More information about the llvm-commits
mailing list