diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-06-11 19:05:55 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-06-11 19:05:55 +0000 |
| commit | 96b033006d9959b2e944779ea8836f2c81cc7e2b (patch) | |
| tree | a187bb3aa55dd012220c386b28416bbe87e7e9cc /clang/lib/Format | |
| parent | 5c4f829424b0e9b3308b716f5874c9a3a978ac6a (diff) | |
| download | bcm5719-llvm-96b033006d9959b2e944779ea8836f2c81cc7e2b.tar.gz bcm5719-llvm-96b033006d9959b2e944779ea8836f2c81cc7e2b.zip | |
Use std::error_code instead of llvm::error_code.
This is an update for a llvm api change.
llvm-svn: 210688
Diffstat (limited to 'clang/lib/Format')
| -rw-r--r-- | clang/lib/Format/Format.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index f497126950d..e3378d14460 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -447,7 +447,7 @@ llvm::error_code parseConfiguration(StringRef Text, FormatStyle *Style) { FormatStyle::LanguageKind Language = Style->Language; assert(Language != FormatStyle::LK_None); if (Text.trim().empty()) - return llvm::make_error_code(llvm::errc::invalid_argument); + return llvm::make_error_code(std::errc::invalid_argument); std::vector<FormatStyle> Styles; llvm::yaml::Input Input(Text); @@ -463,14 +463,14 @@ llvm::error_code parseConfiguration(StringRef Text, FormatStyle *Style) { for (unsigned i = 0; i < Styles.size(); ++i) { // Ensures that only the first configuration can skip the Language option. if (Styles[i].Language == FormatStyle::LK_None && i != 0) - return llvm::make_error_code(llvm::errc::invalid_argument); + return llvm::make_error_code(std::errc::invalid_argument); // Ensure that each language is configured at most once. for (unsigned j = 0; j < i; ++j) { if (Styles[i].Language == Styles[j].Language) { DEBUG(llvm::dbgs() << "Duplicate languages in the config file on positions " << j << " and " << i << "\n"); - return llvm::make_error_code(llvm::errc::invalid_argument); + return llvm::make_error_code(std::errc::invalid_argument); } } } @@ -485,7 +485,7 @@ llvm::error_code parseConfiguration(StringRef Text, FormatStyle *Style) { return llvm::error_code(); } } - return llvm::make_error_code(llvm::errc::not_supported); + return llvm::make_error_code(std::errc::not_supported); } std::string configurationAsText(const FormatStyle &Style) { @@ -2049,7 +2049,7 @@ FormatStyle getStyle(StringRef StyleName, StringRef FileName, break; } if (llvm::error_code ec = parseConfiguration(Text->getBuffer(), &Style)) { - if (ec == llvm::errc::not_supported) { + if (ec == std::errc::not_supported) { if (!UnsuitableConfigFiles.empty()) UnsuitableConfigFiles.append(", "); UnsuitableConfigFiles.append(ConfigFile); |

