Reverted in 98fa95492f3bbd5befdeb36c88a3ac5ef2740b4e. The Assignment Tracking debug-info feature is outlined in this RFC: https://discourse.llvm.org/t/ rfc-assignment-tracking-a-better-way-of-specifying-variable-locations-in-ir This patch plumbs the AssignmentTrackingPass (AKA declare-to-assign), added in the previous patch in this set, into the optimisation pipeline from clang. clang/test/CodeGen/assignment-tracking/assignment-tracking.cpp is the main test for this patch. Note: while clang (with the help of the declare-to-assign pass) can now emit Assignment Tracking metadata, the llvm middle and back ends don't yet understand it. Reviewed By: jmorse Differential Revision: https://reviews.llvm.org/D132226
19 lines
759 B
C++
19 lines
759 B
C++
// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -debug-info-kind=standalone -O0 \
|
|
// RUN: -emit-llvm -fexperimental-assignment-tracking %s -o - \
|
|
// RUN: | FileCheck %s --check-prefixes=FLAG
|
|
// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -debug-info-kind=standalone -O0 \
|
|
// RUN: -emit-llvm %s -o - \
|
|
// RUN: | FileCheck %s --check-prefixes=NO-FLAG
|
|
|
|
// Check some assignment-tracking stuff appears in the output when the flag
|
|
// -fexperimental-assignment-tracking is used, and that it doesn't when
|
|
// the flag is not used (default behaviour: no assignment tracking).
|
|
|
|
// FLAG: DIAssignID
|
|
// FLAG: dbg.assign
|
|
|
|
// NO-FLAG-NOT: DIAssignID
|
|
// NO-FLAG-NOT: dbg.assign
|
|
|
|
void fun(int a) {}
|