[PATCH] D94735: CGDebugInfo: Drop unneeded line number for FlagFwdDecl declarations

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 14 18:20:18 PST 2021


dblaikie added inline comments.


================
Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:3338-3339
   // Get overall information about the record type for the debug info.
   llvm::DIFile *DefUnit = getOrCreateFile(RD->getLocation());
-  const unsigned Line =
-      getLineNumber(RD->getLocation().isValid() ? RD->getLocation() : CurLoc);
+  const unsigned Line = getLineNumber(RD->getLocation());
   StringRef RDName = getClassName(RD);
----------------
Perhaps we can delete these two lines (using null/0 later on/where these values are referenced)? Since they aren't used for forward declarations anyway: https://github.com/llvm-mirror/llvm/blob/master/lib/CodeGen/AsmPrinter/DwarfUnit.cpp#L814


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94735/new/

https://reviews.llvm.org/D94735



More information about the cfe-commits mailing list