Skip to content

Commit 6f16e2c

Browse files
committedDec 19, 2016
[XRay][compiler-rt] Post-commit review fixup of XRay refactoring.
Missed a couple of files: - Using #pragma once - Missing top-matter for headers - Missing an include for <cstdint> Follow-up on D25360. llvm-svn: 290079
1 parent 4527ebe commit 6f16e2c

File tree

2 files changed

+36
-5
lines changed

2 files changed

+36
-5
lines changed
 

‎compiler-rt/lib/xray/xray_emulate_tsc.h

+18-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
1-
#pragma once
2-
#include <time.h>
1+
//===-- xray_emulate_tsc.h --------------------------------------*- C++ -*-===//
2+
//
3+
// The LLVM Compiler Infrastructure
4+
//
5+
// This file is distributed under the University of Illinois Open Source
6+
// License. See LICENSE.TXT for details.
7+
//
8+
//===----------------------------------------------------------------------===//
9+
//
10+
// This file is a part of XRay, a dynamic runtime instrumentation system.
11+
//
12+
//===----------------------------------------------------------------------===//
13+
#ifndef XRAY_EMULATE_TSC_H
14+
#define XRAY_EMULATE_TSC_H
315

416
#include "sanitizer_common/sanitizer_internal_defs.h"
517
#include "xray_defs.h"
18+
#include <cstdint>
19+
#include <time.h>
620

721
namespace __xray {
822

@@ -19,5 +33,6 @@ ALWAYS_INLINE uint64_t readTSC(uint8_t &CPU) XRAY_NEVER_INSTRUMENT {
1933
CPU = 0;
2034
return TS.tv_sec * NanosecondsPerSecond + TS.tv_nsec;
2135
}
22-
2336
}
37+
38+
#endif // XRAY_EMULATE_TSC_H

‎compiler-rt/lib/xray/xray_x86_64.h

+18-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
1-
#pragma once
1+
//===-- xray_x86_64.h -------------------------------------------*- C++ -*-===//
2+
//
3+
// The LLVM Compiler Infrastructure
4+
//
5+
// This file is distributed under the University of Illinois Open Source
6+
// License. See LICENSE.TXT for details.
7+
//
8+
//===----------------------------------------------------------------------===//
9+
//
10+
// This file is a part of XRay, a dynamic runtime instrumentation system.
11+
//
12+
//===----------------------------------------------------------------------===//
13+
#ifndef XRAY_X86_64_H
14+
#define XRAY_X86_64_H
15+
16+
#include <cstdint>
217
#include <x86intrin.h>
318

419
#include "sanitizer_common/sanitizer_internal_defs.h"
@@ -12,5 +27,6 @@ ALWAYS_INLINE uint64_t readTSC(uint8_t &CPU) XRAY_NEVER_INSTRUMENT {
1227
CPU = LongCPU;
1328
return TSC;
1429
}
15-
1630
}
31+
32+
#endif // XRAY_X86_64_H

0 commit comments

Comments
 (0)
Please sign in to comment.