Skip to content

Commit

Permalink
[dataflow] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off buil…
Browse files Browse the repository at this point in the history
…ds after D153006
  • Loading branch information
MaskRay committed Jun 26, 2023
1 parent 82909f4 commit d54bd7a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions clang/lib/Analysis/FlowSensitive/RecordOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,15 @@ namespace dataflow {

void copyRecord(AggregateStorageLocation &Src, AggregateStorageLocation &Dst,
Environment &Env) {
QualType Type = Src.getType();

LLVM_DEBUG({
if (Dst.getType().getCanonicalType().getUnqualifiedType() !=
Type.getCanonicalType().getUnqualifiedType()) {
llvm::dbgs() << "Source type " << Type << "\n";
Src.getType().getCanonicalType().getUnqualifiedType()) {
llvm::dbgs() << "Source type " << Src.getType() << "\n";
llvm::dbgs() << "Destination type " << Dst.getType() << "\n";
}
});
assert(Dst.getType().getCanonicalType().getUnqualifiedType() ==
Type.getCanonicalType().getUnqualifiedType());
Src.getType().getCanonicalType().getUnqualifiedType());

for (auto [Field, SrcFieldLoc] : Src.children()) {
assert(SrcFieldLoc != nullptr);
Expand Down

0 comments on commit d54bd7a

Please sign in to comment.