mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-19 11:35:51 -04:00

This was hard-coded to "clang". This change allows it to to be used on processes other than clang (such as lld). This gets reported as clang-10 on Linux and clang.exe on Windows so adapted test to accommodate this. Differential Revision: https://reviews.llvm.org/D70950
28 lines
622 B
C++
28 lines
622 B
C++
// RUN: %clangxx -S -ftime-trace -ftime-trace-granularity=0 -o %T/check-time-trace %s
|
|
// RUN: cat %T/check-time-trace.json \
|
|
// RUN: | %python -c 'import json, sys; json.dump(json.loads(sys.stdin.read()), sys.stdout, sort_keys=True, indent=2)' \
|
|
// RUN: | FileCheck %s
|
|
|
|
// CHECK: "traceEvents": [
|
|
// CHECK: "args":
|
|
// CHECK: "detail":
|
|
// CHECK: "dur":
|
|
// CHECK: "name":
|
|
// CHECK-NEXT: "ph":
|
|
// CHECK-NEXT: "pid":
|
|
// CHECK-NEXT: "tid":
|
|
// CHECK-NEXT: "ts":
|
|
// CHECK: "name": "clang{{.*}}"
|
|
// CHECK: "name": "process_name"
|
|
|
|
template <typename T>
|
|
struct Struct {
|
|
T Num;
|
|
};
|
|
|
|
int main() {
|
|
Struct<int> S;
|
|
|
|
return 0;
|
|
}
|