[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-commits
Subject:    [PATCH] D77168: Add a flag to debug automatic variable initialization
From:       Fangrui Song via Phabricator via cfe-commits <cfe-commits () lists ! llvm ! org>
Date:       2020-03-31 22:59:57
Message-ID: 5e8075b6698fe90503ea0063c1e6c8dc () localhost ! localdomain
[Download RAW message or body]

MaskRay added inline comments.


================
Comment at: clang/lib/CodeGen/CGDecl.cpp:1814
+    if (StopAfter) {
+      static unsigned Counter = 0;
+      if (Counter >= StopAfter)
----------------
I am a bit worried about the static variable. This makes CodeGen not reusable.


================
Comment at: clang/test/CodeGenCXX/auto-var-init-stop-after.cpp:1
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fblocks \
-ftrivial-auto-var-init=pattern -ftrivial-auto-var-init-stop-after=2 %s -emit-llvm -o \
- | FileCheck %s -check-prefix=PATTERN-STOP-AFTER-2 +// RUN: %clang_cc1 -triple \
x86_64-unknown-unknown -fblocks -ftrivial-auto-var-init=pattern \
-ftrivial-auto-var-init-stop-after=3 %s -emit-llvm -o - | FileCheck %s \
                -check-prefix=PATTERN-STOP-AFTER-3
----------------
You can drop `-fblocks`, because the test has nothing to do with the Blocks \
extension.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77168



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic