diff options
author | Nicola Zaghen <nicola.zaghen@imgtec.com> | 2018-05-15 13:30:56 +0000 |
---|---|---|
committer | Nicola Zaghen <nicola.zaghen@imgtec.com> | 2018-05-15 13:30:56 +0000 |
commit | ff0626ea3cc5e75491876e1c58f7d31bdaf32577 (patch) | |
tree | c4b84a568436b21489131b76eda4f59529383bd3 /lib/Format/Format.cpp | |
parent | c56c870c0c91f79ccbc0e395009e4db65b2eb5e5 (diff) |
[clang] Update uses of DEBUG macro to LLVM_DEBUG.
The DEBUG() macro is very generic so it might clash with other projects.
The renaming was done as follows:
- git grep -l 'DEBUG' | xargs sed -i 's/\bDEBUG\s\?(/LLVM_DEBUG(/g'
- git diff -U0 master | ../clang/tools/clang-format/clang-format-diff.py -i -p1 -style LLVM
Explicitly avoided changing the strings in the clang-format tests.
Differential Revision: https://reviews.llvm.org/D44975
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@332350 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r-- | lib/Format/Format.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index 53db932a5a..f3681a715e 100644 --- a/lib/Format/Format.cpp +++ b/lib/Format/Format.cpp @@ -930,9 +930,9 @@ std::error_code parseConfiguration(StringRef Text, FormatStyle *Style) { // 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"); + LLVM_DEBUG(llvm::dbgs() + << "Duplicate languages in the config file on positions " + << j << " and " << i << "\n"); return make_error_code(ParseError::Error); } } @@ -2146,7 +2146,7 @@ llvm::Expected<FormatStyle> getStyle(StringRef StyleName, StringRef FileName, SmallString<128> ConfigFile(Directory); llvm::sys::path::append(ConfigFile, ".clang-format"); - DEBUG(llvm::dbgs() << "Trying " << ConfigFile << "...\n"); + LLVM_DEBUG(llvm::dbgs() << "Trying " << ConfigFile << "...\n"); Status = FS->status(ConfigFile.str()); bool FoundConfigFile = @@ -2155,7 +2155,7 @@ llvm::Expected<FormatStyle> getStyle(StringRef StyleName, StringRef FileName, // Try _clang-format too, since dotfiles are not commonly used on Windows. ConfigFile = Directory; llvm::sys::path::append(ConfigFile, "_clang-format"); - DEBUG(llvm::dbgs() << "Trying " << ConfigFile << "...\n"); + LLVM_DEBUG(llvm::dbgs() << "Trying " << ConfigFile << "...\n"); Status = FS->status(ConfigFile.str()); FoundConfigFile = Status && (Status->getType() == llvm::sys::fs::file_type::regular_file); @@ -2177,7 +2177,8 @@ llvm::Expected<FormatStyle> getStyle(StringRef StyleName, StringRef FileName, return make_string_error("Error reading " + ConfigFile + ": " + ec.message()); } - DEBUG(llvm::dbgs() << "Using configuration file " << ConfigFile << "\n"); + LLVM_DEBUG(llvm::dbgs() + << "Using configuration file " << ConfigFile << "\n"); return Style; } } |