[PATCH] D20415: Update Clang for D20147 ("DebugInfo: New metadata representation for global variables.")

Adrian Prantl via cfe-commits cfe-commits at lists.llvm.org
Tue May 31 11:17:12 PDT 2016


aprantl accepted this revision.
aprantl added a comment.
This revision is now accepted and ready to land.

LGTM with small changes.


================
Comment at: lib/CodeGen/CGDebugInfo.cpp:3427
@@ -3425,3 +3426,3 @@
         DContext, DeclName, LinkageName, Unit, LineNo, getOrCreateType(T, Unit),
-        Var->hasInternalLinkage(), Var,
+        Var->hasInternalLinkage(), nullptr,
         getOrCreateStaticDataMemberDeclarationOrNull(D));
----------------
I think it would be more readable to pass an empty DIExpression() here.

================
Comment at: lib/CodeGen/CGDebugInfo.cpp:3474
@@ -3472,1 +3473,3 @@
     return;
+  llvm::DIExpression *InitExpr = nullptr;
+  if (Init.isInt())
----------------
Shouldn't the default constructor of DIExpression() wrap an MDNode nullptr?

================
Comment at: lib/CodeGen/CGDebugInfo.h:348
@@ -347,2 +347,3 @@
 
   /// Emit global variable's debug info.
+  void EmitGlobalVariable(const ValueDecl *VD, const APValue &Init);
----------------
While we're here: Emit *a* global variable's debug info?


http://reviews.llvm.org/D20415





More information about the cfe-commits mailing list