[Lldb-commits] [lldb] aa56b30 - [lldb] Make TestLocalVariables.py compatible with the new pass manager

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 4 02:27:22 PST 2021


Author: Pavel Labath
Date: 2021-02-04T11:27:08+01:00
New Revision: aa56b30014d96700b2fc945be11866789f341d38

URL: https://github.com/llvm/llvm-project/commit/aa56b30014d96700b2fc945be11866789f341d38
DIFF: https://github.com/llvm/llvm-project/commit/aa56b30014d96700b2fc945be11866789f341d38.diff

LOG: [lldb] Make TestLocalVariables.py compatible with the new pass manager

The new PM is more aggressive at inlining, which breaks assumptions in
the test => slap some __attribute__((noinlines)) to prevent that.

Added: 
    

Modified: 
    lldb/test/API/lang/c/local_variables/main.c

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/lang/c/local_variables/main.c b/lldb/test/API/lang/c/local_variables/main.c
index 2ab579a71a75..4654443625fc 100644
--- a/lldb/test/API/lang/c/local_variables/main.c
+++ b/lldb/test/API/lang/c/local_variables/main.c
@@ -1,12 +1,8 @@
 #include <stdio.h>
 
-void bar(unsigned i)
-{
-  printf("%d\n", i);
-}
+void __attribute__((noinline)) bar(unsigned i) { printf("%d\n", i); }
 
-void foo(unsigned j)
-{
+void __attribute__((noinline)) foo(unsigned j) {
   unsigned i = j;
   bar(i);
   i = 10;


        


More information about the lldb-commits mailing list