[compiler-rt] 231c1d4 - [xray] Ignore -Wc++20-extensions in xray_records.h [NFC]
Jie Fu via llvm-commits
llvm-commits at lists.llvm.org
Thu May 11 20:11:03 PDT 2023
Author: Jie Fu
Date: 2023-05-12T11:10:08+08:00
New Revision: 231c1d4134513e5a97cfdc874e8bda488ad59699
URL: https://github.com/llvm/llvm-project/commit/231c1d4134513e5a97cfdc874e8bda488ad59699
DIFF: https://github.com/llvm/llvm-project/commit/231c1d4134513e5a97cfdc874e8bda488ad59699.diff
LOG: [xray] Ignore -Wc++20-extensions in xray_records.h [NFC]
/data/llvm-project/compiler-rt/lib/xray/../../include/xray/xray_records.h:48:24: error: default member initializer for bit-field is a C++20 extension [
-Werror,-Wc++20-extensions]
bool ConstantTSC : 1 = false;
^
/data/llvm-project/compiler-rt/lib/xray/../../include/xray/xray_records.h:49:23: error: default member initializer for bit-field is a C++20 extension [
-Werror,-Wc++20-extensions]
bool NonstopTSC : 1 = false;
^
2 errors generated.
Added:
Modified:
compiler-rt/include/xray/xray_records.h
Removed:
################################################################################
diff --git a/compiler-rt/include/xray/xray_records.h b/compiler-rt/include/xray/xray_records.h
index 4789509c2c24..268c653d6b2d 100644
--- a/compiler-rt/include/xray/xray_records.h
+++ b/compiler-rt/include/xray/xray_records.h
@@ -43,10 +43,13 @@ struct alignas(32) XRayFileHeader {
// have
diff erent files for
diff erent information being stored.
uint16_t Type = 0;
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wc++20-extensions"
// What follows are a set of flags that indicate useful things for when
// reading the data in the file.
bool ConstantTSC : 1 = false;
bool NonstopTSC : 1 = false;
+ #pragma clang diagnostic pop
// The frequency by which TSC increases per-second.
alignas(8) uint64_t CycleFrequency = 0;
More information about the llvm-commits
mailing list