Fix unused variable warnings:

This patch fixes warnings during a release build:

  mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp:198:52: error:
  lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture]

  bolt/lib/Rewrite/RewriteInstance.cpp:5318:18: error: unused variable
  'HasNoAddress' [-Werror,-Wunused-variable]
This commit is contained in:
Kazu Hirata 2022-09-19 10:42:49 -07:00
parent 7d23d1e640
commit 981fa1c15c
2 changed files with 2 additions and 0 deletions

View File

@ -5321,6 +5321,7 @@ void RewriteInstance::rewriteFile() {
assert(llvm::all_of(Function->getLayout().getSplitFragments(),
HasNoAddress) &&
"Some split fragments have an address while others do not");
(void)HasNoAddress;
continue;
}

View File

@ -196,6 +196,7 @@ DiagnosedSilenceableFailure
transform::TransformState::applyTransform(TransformOpInterface transform) {
LLVM_DEBUG(DBGS() << "applying: " << transform << "\n");
auto printOnFailureRAII = llvm::make_scope_exit([this] {
(void)this;
DEBUG_WITH_TYPE(DEBUG_PRINT_AFTER_ALL, {
DBGS() << "Top-level payload:\n";
getTopLevel()->print(llvm::dbgs(),