[PATCH] D35994: Debug info for variables whos type is shrinked to bool

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 28 08:31:36 PDT 2017


aprantl added inline comments.


================
Comment at: lib/Transforms/IPO/GlobalOpt.cpp:1577
+  for(auto *GV : GVs)
+    NewGV->addDebugInfo(GV);
+
----------------
I'm not familiar with this transformation: Do we need to add a DIExpression to mask out all but the first bit (i.e. can multiple bools be packed into the same uint32_t such that it could confuse debuggers)?


================
Comment at: test/Transforms/GlobalOpt/static-global-boolean-dwarf.c:2
+// RUN: clang -g -O2 -c %s -o %t
+// RUN: llvm-dwarfdump %t | FileCheck %s
+
----------------
We shouldn't require a frontend to be available when running tests. Can you use thew output of clang -S -emit-llvm instead an run it through opt?


https://reviews.llvm.org/D35994





More information about the llvm-commits mailing list