//===-- StringExtras.h - Useful string functions -----------------*- C++ -*--=//
//
// This file contains some functions that are useful when dealing with strings.
-// No library is required when using these functinons.
//
//===----------------------------------------------------------------------===//
#include <stdio.h>
#include "llvm/Support/DataTypes.h"
+class ConstPoolArray;
+
static inline string utostr(uint64_t X, bool isNeg = false) {
char Buffer[40];
char *BufPtr = Buffer+39;
for (unsigned i=0; i < indent; i++)
os << istr;
}
+
+// Can we treat the specified array as a string? Only if it is an array of
+// ubytes or non-negative sbytes.
+//
+bool isStringCompatible(ConstPoolArray *CPA);
+
+// getAsCString - Return the specified array as a C compatible string, only if
+// the predicate isStringCompatible is true.
+//
+string getAsCString(ConstPoolArray *CPA);
+
#endif