Skip to content

Commit

Permalink
[FunctionImport] Avoid unused variable warnings in Release builds
Browse files Browse the repository at this point in the history
Just skip the entire block in NDEBUG. No functionality change intended.

llvm-svn: 312031
  • Loading branch information
d0k committed Aug 29, 2017
1 parent 978e2e4 commit 154411e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions llvm/lib/Transforms/IPO/FunctionImport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,7 @@ Expected<bool> FunctionImporter::importFunctions(
GlobalsToImport.insert(&GV);
}
}
#ifndef NDEBUG
for (GlobalAlias &GA : SrcModule->aliases()) {
if (!GA.hasName())
continue;
Expand All @@ -735,6 +736,7 @@ Expected<bool> FunctionImporter::importFunctions(
<< " " << GA.getName() << " from "
<< SrcModule->getSourceFileName() << "\n");
}
#endif

// Upgrade debug info after we're done materializing all the globals and we
// have loaded all the required metadata!
Expand Down

0 comments on commit 154411e

Please sign in to comment.