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 | 534f692b4d1e6dd28dedebaee69a520fb1a73326 (patch) | |
| tree | 7bb896bea45b7fd4a02eedc202eebc684db2e6ff /lib/Format/Format.cpp | |
| parent | d765b5b8c62bcf023dd8a4fcada3d377d52b450d (diff) | |
| download | clang-534f692b4d1e6dd28dedebaee69a520fb1a73326.tar.gz clang-534f692b4d1e6dd28dedebaee69a520fb1a73326.tar.bz2 clang-534f692b4d1e6dd28dedebaee69a520fb1a73326.tar.xz | |
Use std::error_code instead of llvm::error_code.
This is an update for a llvm api change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210688 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/Format.cpp')
| -rw-r--r-- | lib/Format/Format.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index f497126950..e3378d1446 100644 --- a/lib/Format/Format.cpp +++ b/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); |
