[Lldb-commits] [PATCH] D11133: [MIPS] Detect MIPS application specific extensions like micromips

Greg Clayton clayborg at gmail.com
Mon Jul 13 10:40:13 PDT 2015


clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

A few changes as noted in inlined comments.


================
Comment at: source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp:418
@@ -417,3 +417,3 @@
 
-DisassemblerLLVMC::LLVMCDisassembler::LLVMCDisassembler (const char *triple, const char *cpu, unsigned flavor, DisassemblerLLVMC &owner):
+DisassemblerLLVMC::LLVMCDisassembler::LLVMCDisassembler (const char *triple, const char *cpu, std::string features_str, unsigned flavor, DisassemblerLLVMC &owner):
     m_is_valid(true)
----------------
Make "features_str" a "const char *". No need to construct a std::string just to pass a string argument. Or we can use llvm::StringRef objects for triple, cpu and features_str.

================
Comment at: source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp:693
@@ -677,3 +692,3 @@
     
-    m_disasm_ap.reset (new LLVMCDisassembler(triple, cpu, flavor, *this));
+    m_disasm_ap.reset (new LLVMCDisassembler(triple, cpu, features_str, flavor, *this));
     if (!m_disasm_ap->IsValid())
----------------
pass features_str.c_str() if we switch to "const char *" as mentioned above, else it will make an llvm::StringRef implicitly.

================
Comment at: source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h:44
@@ -43,3 +43,3 @@
     public:
-        LLVMCDisassembler (const char *triple, const char *cpu, unsigned flavor, DisassemblerLLVMC &owner);
+        LLVMCDisassembler (const char *triple, const char *cpu, std::string features_str, unsigned flavor, DisassemblerLLVMC &owner);
 
----------------
Make "features_str" a "const char *". No need to construct a std::string just to pass a string argument. Or we can use llvm::StringRef objects for triple, cpu and features_str.


Repository:
  rL LLVM

http://reviews.llvm.org/D11133







More information about the lldb-commits mailing list