================
@@ -135,6 +137,24 @@ bool Builtin::Context::isBuiltinFunc(llvm::StringRef 
FuncName) {
   return false;
 }
 
+static bool isSymbolAvailableInC89(const llvm::StringTable &Strings,
+                                   const Builtin::Info &BuiltinInfo) {
+
+  auto NameStr = Strings[BuiltinInfo.Offsets.Name];
+
+  if (NameStr.starts_with("__builtin_")) {
+    return true;
+  }
+
+  // FIXME: add other C89 symbols here
+  if (NameStr == "log" || NameStr == "va_start" || NameStr == "va_arg" ||
+      NameStr == "va_end") {
+    return true;
+  }
----------------
frederick-vs-ja wrote:

The list would be very long, see https://port70.net/~nsz/c/c89/c89-draft.html. 
Perhaps we should add a `.def` file for this.

https://github.com/llvm/llvm-project/pull/129979
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to