[compiler-rt] r290079 - [XRay][compiler-rt] Post-commit review fixup of XRay refactoring.

Dean Michael Berris via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 18 19:59:20 PST 2016


Author: dberris
Date: Sun Dec 18 21:59:20 2016
New Revision: 290079

URL: http://llvm.org/viewvc/llvm-project?rev=290079&view=rev
Log:
[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.

Modified:
    compiler-rt/trunk/lib/xray/xray_emulate_tsc.h
    compiler-rt/trunk/lib/xray/xray_x86_64.h

Modified: compiler-rt/trunk/lib/xray/xray_emulate_tsc.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/xray/xray_emulate_tsc.h?rev=290079&r1=290078&r2=290079&view=diff
==============================================================================
--- compiler-rt/trunk/lib/xray/xray_emulate_tsc.h (original)
+++ compiler-rt/trunk/lib/xray/xray_emulate_tsc.h Sun Dec 18 21:59:20 2016
@@ -1,8 +1,22 @@
-#pragma once
-#include <time.h>
+//===-- xray_emulate_tsc.h --------------------------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file is a part of XRay, a dynamic runtime instrumentation system.
+//
+//===----------------------------------------------------------------------===//
+#ifndef XRAY_EMULATE_TSC_H
+#define XRAY_EMULATE_TSC_H
 
 #include "sanitizer_common/sanitizer_internal_defs.h"
 #include "xray_defs.h"
+#include <cstdint>
+#include <time.h>
 
 namespace __xray {
 
@@ -19,5 +33,6 @@ ALWAYS_INLINE uint64_t readTSC(uint8_t &
   CPU = 0;
   return TS.tv_sec * NanosecondsPerSecond + TS.tv_nsec;
 }
-
 }
+
+#endif // XRAY_EMULATE_TSC_H

Modified: compiler-rt/trunk/lib/xray/xray_x86_64.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/xray/xray_x86_64.h?rev=290079&r1=290078&r2=290079&view=diff
==============================================================================
--- compiler-rt/trunk/lib/xray/xray_x86_64.h (original)
+++ compiler-rt/trunk/lib/xray/xray_x86_64.h Sun Dec 18 21:59:20 2016
@@ -1,4 +1,19 @@
-#pragma once
+//===-- xray_x86_64.h -------------------------------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file is a part of XRay, a dynamic runtime instrumentation system.
+//
+//===----------------------------------------------------------------------===//
+#ifndef XRAY_X86_64_H
+#define XRAY_X86_64_H
+
+#include <cstdint>
 #include <x86intrin.h>
 
 #include "sanitizer_common/sanitizer_internal_defs.h"
@@ -12,5 +27,6 @@ ALWAYS_INLINE uint64_t readTSC(uint8_t &
   CPU = LongCPU;
   return TSC;
 }
-
 }
+
+#endif // XRAY_X86_64_H




More information about the llvm-commits mailing list