summaryrefslogtreecommitdiffstats
path: root/polly/lib/External/ppcg/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'polly/lib/External/ppcg/util.h')
-rw-r--r--polly/lib/External/ppcg/util.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/polly/lib/External/ppcg/util.h b/polly/lib/External/ppcg/util.h
new file mode 100644
index 00000000000..6c29a150e4d
--- /dev/null
+++ b/polly/lib/External/ppcg/util.h
@@ -0,0 +1,13 @@
+#ifndef UTIL_H
+#define UTIL_H
+
+#include <string.h>
+
+/* Compare the prefix of "s" to "prefix" up to the length of "prefix".
+ */
+static inline int prefixcmp(const char *s, const char *prefix)
+{
+ return strncmp(s, prefix, strlen(prefix));
+}
+
+#endif
OpenPOWER on IntegriCloud