]> granicus.if.org Git - clang/commitdiff
accept and ignore a few things for better OpenBSD compatibility,
authorChris Lattner <sabre@nondot.org>
Fri, 18 Feb 2011 17:05:55 +0000 (17:05 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 18 Feb 2011 17:05:55 +0000 (17:05 +0000)
patch by Amit Kulkarni!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125944 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/AttributeList.cpp
lib/Sema/SemaDeclAttr.cpp

index 73e956cc91a4db77db3d85a933d493e2e03b484c..c0a305365afc027a38fec87140b889482ecc404e 100644 (file)
@@ -120,6 +120,7 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo *Name) {
     .Case("init_priority", AT_init_priority)
     .Case("no_instrument_function", AT_no_instrument_function)
     .Case("thiscall", AT_thiscall)
+    .Case("bounded", IgnoredAttribute)       // OpenBSD
     .Case("pascal", AT_pascal)
     .Case("__cdecl", AT_cdecl)
     .Case("__stdcall", AT_stdcall)
index 54e9405cbac66cc8aec75bcbaa8e1c8232a02b13..cbc940f2f0ac4c1ed543c3b004b328881574c486 100644 (file)
@@ -1603,7 +1603,8 @@ static FormatAttrKind getFormatAttrKind(llvm::StringRef Format) {
   if (Format == "scanf" || Format == "printf" || Format == "printf0" ||
       Format == "strfmon" || Format == "cmn_err" || Format == "strftime" ||
       Format == "NSString" || Format == "CFString" || Format == "vcmn_err" ||
-      Format == "zcmn_err")
+      Format == "zcmn_err" ||
+      Format == "kprintf")  // OpenBSD.
     return SupportedFormat;
 
   if (Format == "gcc_diag" || Format == "gcc_cdiag" ||