diff options
Diffstat (limited to 'include/clang/Basic/Builtins.h')
-rw-r--r-- | include/clang/Basic/Builtins.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/clang/Basic/Builtins.h b/include/clang/Basic/Builtins.h index 15e9a413fb42..87c1f93eedef 100644 --- a/include/clang/Basic/Builtins.h +++ b/include/clang/Basic/Builtins.h @@ -139,6 +139,13 @@ public: return strchr(getRecord(ID).Attributes, 'f') != nullptr; } + /// \brief Returns true if this builtin requires appropriate header in other + /// compilers. In Clang it will work even without including it, but we can emit + /// a warning about missing header. + bool isHeaderDependentFunction(unsigned ID) const { + return strchr(getRecord(ID).Attributes, 'h') != nullptr; + } + /// \brief Determines whether this builtin is a predefined compiler-rt/libgcc /// function, such as "__clear_cache", where we know the signature a /// priori. |