summaryrefslogtreecommitdiff
path: root/include/tools/cpuid.hxx
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-10-27 10:09:31 +0200
committerLuboš Luňák <l.lunak@collabora.com>2021-10-27 18:36:59 +0200
commited43620c007e7fa8eb3a4ea49a90d2171b8de594 (patch)
tree728c45ebf91b3bfc6d4d7f8cb7318906ff23d2cd /include/tools/cpuid.hxx
parent7ba33498303b5c9761d14feb03074d8392e15b2e (diff)
CPU-specific files should not include templates or inlines
Otherwise the possible copy emitted compiled with CPU-specific instructions might be chosen as the copy to keep and would be used by generic code. See history for the Calc Kahan code. Change-Id: Ifc1bbd8d9720d9effe05b8ff8ee5e804363939df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124257 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'include/tools/cpuid.hxx')
-rw-r--r--include/tools/cpuid.hxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/tools/cpuid.hxx b/include/tools/cpuid.hxx
index 0fb1d5b8e965..1be897e84a4e 100644
--- a/include/tools/cpuid.hxx
+++ b/include/tools/cpuid.hxx
@@ -15,6 +15,16 @@
#include <o3tl/typed_flags_set.hxx>
#include <rtl/ustring.hxx>
+/*
+
+Do NOT include this header in source files compiled with CPU-specific code.
+TODO: For the header to be safe that way, it should be free of any templates
+or inline functions, otherwise their possibly emitted copies compiled
+with the CPU-specific instructions might be chosen by the linker as the copy
+to keep.
+
+*/
+
namespace cpuid {
enum class InstructionSetFlags