]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix a few Char/HChar mixups for cachegrind.
authorFlorian Krohm <florian@eich-krohm.de>
Sun, 21 Oct 2012 02:39:42 +0000 (02:39 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Sun, 21 Oct 2012 02:39:42 +0000 (02:39 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13068

cachegrind/cg-arch.c
cachegrind/cg_main.c

index f3c6df46b2a540f71e1b024419e6d332c972d57f..f66a83c53c3195acaf2425087983b1f0d27de939 100644 (file)
@@ -41,7 +41,7 @@ static void configure_caches(cache_t* I1c, cache_t* D1c, cache_t* LLc,
 
 // Checks cache config is ok.  Returns NULL if ok, or a pointer to an error
 // string otherwise.
-static Char* check_cache(cache_t* cache)
+static const HChar* check_cache(cache_t* cache)
 {
    // Simulator requires set count to be a power of two.
    if ((cache->size % (cache->line_size * cache->assoc) != 0) ||
@@ -80,7 +80,7 @@ static void parse_cache_opt ( cache_t* cache, Char* opt, Char* optval )
 {
    Long i1, i2, i3;
    Char* endptr;
-   Char* checkRes;
+   const HChar* checkRes;
 
    // Option argument looks like "65536,2,64".  Extract them.
    i1 = VG_(strtoll10)(optval,   &endptr); if (*endptr != ',')  goto bad;
@@ -133,7 +133,7 @@ Bool VG_(str_clo_cache_opt)(Char *arg,
       return False;
 }
 
-static void umsg_cache_img(Char* desc, cache_t* c)
+static void umsg_cache_img(const HChar* desc, cache_t* c)
 {
    VG_(umsg)("  %s: %'d B, %d-way, %d B lines\n", desc,
              c->size, c->assoc, c->line_size);
@@ -141,9 +141,9 @@ static void umsg_cache_img(Char* desc, cache_t* c)
 
 // Verifies if c is a valid cache.
 // An invalid value causes an assert, unless clo_redefined is True.
-static void check_cache_or_override(Char* desc, cache_t* c, Bool clo_redefined)
+static void check_cache_or_override(const HChar* desc, cache_t* c, Bool clo_redefined)
 {
-   Char* checkRes;
+   const HChar* checkRes;
 
    checkRes = check_cache(c);
    if (checkRes) {
@@ -416,7 +416,7 @@ configure_caches(cache_t *I1c, cache_t *D1c, cache_t *LLc,
 #endif
 
    if (!all_caches_clo_defined) {
-      const char warning[] =
+      const HChar warning[] =
         "Warning: Cannot auto-detect cache config, using defaults.\n"
         "         Run with -v to see.\n";
       VG_(dmsg)("%s", warning);
index 487e0420f15619fc5eb113503e219e66310ed663..78c9d6062719c5851d3f3dc4993c48775e1455a5 100644 (file)
@@ -67,7 +67,7 @@
 
 static Bool  clo_cache_sim  = True;  /* do cache simulation? */
 static Bool  clo_branch_sim = False; /* do branch simulation? */
-static Char* clo_cachegrind_out_file = "cachegrind.out.%p";
+static HChar* clo_cachegrind_out_file = "cachegrind.out.%p";
 
 /*------------------------------------------------------------*/
 /*--- Cachesim configuration                               ---*/
@@ -667,7 +667,7 @@ InstrInfo* setup_InstrInfo ( CgState* cgs, Addr instr_addr, UInt instr_len )
 static void flushEvents ( CgState* cgs )
 {
    Int        i, regparms;
-   Char*      helperName;
+   const HChar* helperName;
    void*      helperAddr;
    IRExpr**   argv;
    IRExpr*    i_node_expr;
@@ -1464,7 +1464,8 @@ static UInt ULong_width(ULong n)
 
 static void cg_fini(Int exitcode)
 {
-   static Char buf1[128], buf2[128], buf3[128], buf4[123], fmt[128];
+   static Char buf1[128], buf2[128], buf3[128], buf4[123];
+   static HChar fmt[128];
 
    CacheCC  D_total;
    BranchCC B_total;