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 4ffdc3a commit 5c8d247
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 @@ -67,17 +67,15 @@ void copyRecord(AggregateStorageLocation &Src, AggregateStorageLocation &Dst,
bool recordsEqual(const AggregateStorageLocation &Loc1, const Environment &Env1,
const AggregateStorageLocation &Loc2,
const Environment &Env2) {
QualType Type = Loc1.getType();

LLVM_DEBUG({
if (Loc2.getType().getCanonicalType().getUnqualifiedType() !=
Type.getCanonicalType().getUnqualifiedType()) {
llvm::dbgs() << "Loc1 type " << Type << "\n";
Loc1.getType().getCanonicalType().getUnqualifiedType()) {
llvm::dbgs() << "Loc1 type " << Loc1.getType() << "\n";
llvm::dbgs() << "Loc2 type " << Loc2.getType() << "\n";
}
});
assert(Loc2.getType().getCanonicalType().getUnqualifiedType() ==
Type.getCanonicalType().getUnqualifiedType());
Loc1.getType().getCanonicalType().getUnqualifiedType());

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

0 comments on commit 5c8d247

Please sign in to comment.