[clang] 3f7f7f1 - [clang][APINotes] Fix gcc Wunused-function warning (NFC)
Yang Fan via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 9 19:47:25 PST 2021
Author: Yang Fan
Date: 2021-03-10T11:47:00+08:00
New Revision: 3f7f7f161540ba4a0f8cd48a4f1d5ab323cedd92
URL: https://github.com/llvm/llvm-project/commit/3f7f7f161540ba4a0f8cd48a4f1d5ab323cedd92
DIFF: https://github.com/llvm/llvm-project/commit/3f7f7f161540ba4a0f8cd48a4f1d5ab323cedd92.diff
LOG: [clang][APINotes] Fix gcc Wunused-function warning (NFC)
GCC warning:
```
/llvm-project/clang/lib/APINotes/APINotesYAMLCompiler.cpp:574:6: warning: ‘void {anonymous}::Module::dump()’ defined but not used [-Wunused-function]
574 | void Module::dump() {
| ^~~~~~
```
Added:
Modified:
clang/lib/APINotes/APINotesYAMLCompiler.cpp
Removed:
################################################################################
diff --git a/clang/lib/APINotes/APINotesYAMLCompiler.cpp b/clang/lib/APINotes/APINotesYAMLCompiler.cpp
index a4120120a01c..cf50e26b1c87 100644
--- a/clang/lib/APINotes/APINotesYAMLCompiler.cpp
+++ b/clang/lib/APINotes/APINotesYAMLCompiler.cpp
@@ -551,7 +551,7 @@ struct Module {
llvm::Optional<bool> SwiftInferImportAsMember = {llvm::None};
- LLVM_DUMP_METHOD void dump() /*const*/;
+ void dump() /*const*/;
};
} // namespace
@@ -571,7 +571,7 @@ template <> struct MappingTraits<Module> {
} // namespace yaml
} // namespace llvm
-void Module::dump() {
+LLVM_DUMP_METHOD void Module::dump() {
llvm::yaml::Output OS(llvm::errs());
OS << *this;
}
More information about the cfe-commits
mailing list