[PATCH] D85458: Adding functionality to Stack Tracing

Dibya Ranjan Mishra via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 10:50:39 PDT 2020


dibya001 added inline comments.


================
Comment at: llvm/include/llvm/Support/PrettyStackTrace.h:99
+
+    void setArgs(int argC, const char *const *argV) {
+      this->ArgV = argV;
----------------
aganea wrote:
> Please explain why this is needed. How would things work out in your code if neither `setArgs` nor the empty constructor were there?
I want to to declare PrettyStackTraceProgram's object globally so that I have access to it in other portions of code.  While declaring globally I don't have argc and argv, Hence I need this default constructor. And in main, I will call the setArgs with argc and argv values


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

https://reviews.llvm.org/D85458



More information about the llvm-commits mailing list