Skip to content

Commit

Permalink
Remove left-over from SQL exporter code
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 374056639
Change-Id: I115daf7f209a4731defad73e909c23b5b0291e36
  • Loading branch information
cblichmann authored and copybara-github committed May 16, 2021
1 parent 48b0185 commit bd31841
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions ida/main_plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ std::string GetArgument(absl::string_view name) {
return option ? option : "";
}

enum class ExportMode { kSql = 1, kBinary = 2, kText = 3, kStatistics = 4 };
enum class ExportMode { kBinary = 2, kText = 3, kStatistics = 4 };

std::string GetDefaultName(ExportMode mode) {
std::string new_extension;
Expand All @@ -76,9 +76,6 @@ std::string GetDefaultName(ExportMode mode) {
case ExportMode::kStatistics:
new_extension = ".statistics";
break;
case ExportMode::kSql:
// No extension for database export.
break;
}
return ReplaceFileExtension(GetModuleName(), new_extension);
}
Expand Down Expand Up @@ -127,12 +124,8 @@ void ExportIdb(Writer* writer) {

int ExportBinary(const std::string& filename) {
try {
std::string hash;
if (auto sha256_or = GetInputFileSha256(); sha256_or.ok()) {
hash = std::move(sha256_or).value();
} else {
hash = GetInputFileMd5().value_or("");
}
const std::string hash =
GetInputFileSha256().value_or(GetInputFileMd5().value_or(""));
BinExport2Writer writer(filename, GetModuleName(), hash,
GetArchitectureName().value());
ExportIdb(&writer);
Expand Down

0 comments on commit bd31841

Please sign in to comment.