Inline my uuid_is_null() implementation in a header file
authorJason Molenda <jason@molenda.com>
Tue, 2 Aug 2022 21:23:00 +0000 (14:23 -0700)
committerJason Molenda <jason@molenda.com>
Tue, 2 Aug 2022 21:24:11 +0000 (14:24 -0700)
This either needs to be static, or forced inline, or in a separate
source file.  Given that we only have one function in this
UuidCompatibility.h, I think forced inline for the handful of uses
of it may be best.

lldb/source/Utility/UuidCompatibility.h

index fe4aed0..40ebc1d 100644 (file)
@@ -15,7 +15,7 @@
 typedef unsigned char uuid_t[16];
 
 // Return 1 if uuid is null, that is, all zeroes.
-int uuid_is_null(uuid_t uuid) {
+inline __attribute__((always_inline)) int uuid_is_null(uuid_t uuid) {
   for (int i = 0; i < 16; i++)
     if (uuid[i])
       return 0;