summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2011-08-08 15:49:07 +0000
committerHoward Hinnant <hhinnant@apple.com>2011-08-08 15:49:07 +0000
commit49b607a2cd40f4f3051d4a6d4f38d7699025b096 (patch)
treeb65dfa0d8dbf8b690301fe0c46391fb383dc6091
parent7c9f1fa9cf79541c36494818cae1b9785e6895a6 (diff)
downloadbcm5719-llvm-49b607a2cd40f4f3051d4a6d4f38d7699025b096.tar.gz
bcm5719-llvm-49b607a2cd40f4f3051d4a6d4f38d7699025b096.zip
Silence some -Wall warnings pointed out by Marshall Clow
llvm-svn: 137047
-rw-r--r--libcxxabi/include/cxa_demangle.h2
-rw-r--r--libcxxabi/src/cxa_demangle.cpp52
2 files changed, 1 insertions, 53 deletions
diff --git a/libcxxabi/include/cxa_demangle.h b/libcxxabi/include/cxa_demangle.h
index bb4ce60e121..8ba2c8db1c4 100644
--- a/libcxxabi/include/cxa_demangle.h
+++ b/libcxxabi/include/cxa_demangle.h
@@ -18,7 +18,7 @@ namespace __cxxabiv1
namespace __libcxxabi
{
-struct __demangle_tree;
+class __demangle_tree;
class __node;
char*
diff --git a/libcxxabi/src/cxa_demangle.cpp b/libcxxabi/src/cxa_demangle.cpp
index 1b6da076405..2890006552e 100644
--- a/libcxxabi/src/cxa_demangle.cpp
+++ b/libcxxabi/src/cxa_demangle.cpp
@@ -12512,7 +12512,6 @@ __demangle_tree::__parse_type(const char* first, const char* last,
*__sub_end_++ = __root_;
if (try_to_parse_template_args)
{
- __node* temp = __root_;
const char* t2 = __parse_template_args(t, last);
if (t2 != t)
{
@@ -14850,55 +14849,6 @@ display(dmg_tree.__root_);
printf("\n");
#endif
const size_t bs = buf == NULL ? 0 : *n;
-#if 0
- const unsigned N = 1024;
- char tmp[N];
- char* f;
- char* l;
- if (bs < N)
- {
- f = tmp;
- l = f + N;
- }
- else
- {
- f = buf;
- l = f + bs;
- }
- const ptrdiff_t sz = dmg_tree.__root_->print(f, l-1);
- if (sz > l-f-1)
- {
- buf = static_cast<char*>(realloc(buf, sz+1));
- if (buf == NULL)
- {
- if (status)
- *status = memory_alloc_failure;
- return NULL;
- }
- if (n)
- *n = sz+1;
- dmg_tree.__root_->print(buf, buf+sz);
- buf[sz] = '\0';
- goto end;
- }
- f[sz] = '\0';
- if (f != buf)
- {
- if (bs < sz+1)
- {
- buf = static_cast<char*>(realloc(buf, sz+1));
- if (buf == NULL)
- {
- if (status)
- *status = memory_alloc_failure;
- return NULL;
- }
- if (n)
- *n = sz+1;
- }
- strncpy(buf, f, sz+1);
- }
-#else
ptrdiff_t sm = dmg_tree.__mangled_name_end_ - dmg_tree.__mangled_name_begin_;
ptrdiff_t est = sm + 50 * (dmg_tree.__node_end_ - dmg_tree.__node_begin_);
const unsigned N = 4096;
@@ -14937,8 +14887,6 @@ printf("\n");
else
*dmg_tree.__get_demangled_name(buf) = '\0';
}
-#endif
-end:
if (status)
*status = success;
return buf;
OpenPOWER on IntegriCloud