[flang-commits] [lld] [compiler-rt] [flang] [libcxx] [llvm] [libc] [clang] [clang-tools-extra] [lldb] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

Aaron Ballman via flang-commits flang-commits at lists.llvm.org
Thu Nov 2 06:23:09 PDT 2023


================
@@ -569,4 +569,12 @@ void AnnotateIgnoreWritesEnd(const char *file, int line);
 #define LLVM_NO_PROFILE_INSTRUMENT_FUNCTION
 #endif
 
+/// \macro LLVM_PREFERRED_TYPE
+/// Adjust type of bit-field in debug info.
+#if __has_attribute(preferred_type)
----------------
AaronBallman wrote:

```suggestion
#if LLVM_HAS_CPP_ATTRIBUTE(clang::preferred_type)
```
or leave the condition as-is and change the expansion to using `__attribute__(())` instead. Just making sure they both match up. (If we're using this from C interfaces, then we probably want to use the GNU-style spelling.)

https://github.com/llvm/llvm-project/pull/70349


More information about the flang-commits mailing list