diff --git a/clang/include/clang/Basic/TargetInfo.h b/clang/include/clang/Basic/TargetInfo.h --- a/clang/include/clang/Basic/TargetInfo.h +++ b/clang/include/clang/Basic/TargetInfo.h @@ -1207,7 +1207,7 @@ } // Get the cache line size of a given cpu. This method switches over - // the given cpu and returns `0` if the CPU is not found. + // the given cpu and returns "None" if the CPU is not found. virtual Optional getCPUCacheLineSize() const { return None; } // Returns maximal number of args passed in registers. diff --git a/clang/lib/Basic/Targets/X86.cpp b/clang/lib/Basic/Targets/X86.cpp --- a/clang/lib/Basic/Targets/X86.cpp +++ b/clang/lib/Basic/Targets/X86.cpp @@ -1745,7 +1745,7 @@ // | Sandy Bridge | 64 | https://en.wikipedia.org/wiki/Sandy_Bridge and https://www.7-cpu.com/cpu/SandyBridge.html | // | Ivy Bridge | 64 | https://blog.stuffedcow.net/2013/01/ivb-cache-replacement/ and https://www.7-cpu.com/cpu/IvyBridge.html | // | Haswell | 64 | https://www.7-cpu.com/cpu/Haswell.html | -// | Bradwell | 64 | https://www.7-cpu.com/cpu/Broadwell.html | +// | Boadwell | 64 | https://www.7-cpu.com/cpu/Broadwell.html | // | Skylake (including skylake-avx512) | 64 | https://www.nas.nasa.gov/hecc/support/kb/skylake-processors_550.html "Cache Hierarchy" | // | Cascade Lake | 64 | https://www.nas.nasa.gov/hecc/support/kb/cascade-lake-processors_579.html "Cache Hierarchy" | // | Skylake | 64 | https://en.wikichip.org/wiki/intel/microarchitectures/kaby_lake "Memory Hierarchy" | @@ -1833,11 +1833,11 @@ case CK_x86_64: case CK_Yonah: case CK_Penryn: + case CK_Core2: return 64; // The following currently have unknown cache line sizes (but they are probably all 64): // Core - case CK_Core2: case CK_Generic: return None; }