Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2012-03-09 00:16:45 +0400
committerHoward Hinnant <hhinnant@apple.com>2012-03-09 00:16:45 +0400
commitd121eb2c242a4b5595597cb8d5e914ceea116821 (patch)
tree61889eeb007b7f83f43fe088130fd0a8f6060558 /libcxxabi/src
parent941d092933ffa325a1b5ce8816bcf4a8c0968e50 (diff)
Enable/silence -Wconversion.
llvm-svn: 152328
Diffstat (limited to 'libcxxabi/src')
-rw-r--r--libcxxabi/src/cxa_demangle.cpp6
-rw-r--r--libcxxabi/src/cxa_personality.cpp4
-rw-r--r--libcxxabi/src/fallback_malloc.ipp4
3 files changed, 7 insertions, 7 deletions
diff --git a/libcxxabi/src/cxa_demangle.cpp b/libcxxabi/src/cxa_demangle.cpp
index ec71d7ba3d70..7cfd1a81e105 100644
--- a/libcxxabi/src/cxa_demangle.cpp
+++ b/libcxxabi/src/cxa_demangle.cpp
@@ -460,7 +460,7 @@ class __source_name
: public __node
{
public:
- __source_name(const char* __name, unsigned __size)
+ __source_name(const char* __name, size_t __size)
{
__name_ = __name;
__size_ = __size;
@@ -5962,7 +5962,7 @@ class __dot_suffix
: public __node
{
public:
- __dot_suffix(__node* name, const char* suffix, unsigned sz)
+ __dot_suffix(__node* name, const char* suffix, size_t sz)
{
__left_ = name;
__name_ = suffix;
@@ -10259,7 +10259,7 @@ __demangle_tree::__parse_nested_name(const char* first, const char* last)
}
break;
case 'U':
- assert(!"__parse_nested_name U");
+ // assert(!"__parse_nested_name U");
// could have following <template-args>
break;
case 'T':
diff --git a/libcxxabi/src/cxa_personality.cpp b/libcxxabi/src/cxa_personality.cpp
index 874a0696bbf3..0dccb11479ca 100644
--- a/libcxxabi/src/cxa_personality.cpp
+++ b/libcxxabi/src/cxa_personality.cpp
@@ -247,7 +247,7 @@ readEncodedPointer(const uint8_t** data, uint8_t encoding)
p += sizeof(uint32_t);
break;
case DW_EH_PE_udata8:
- result = *((uint64_t*)p);
+ result = static_cast<uintptr_t>(*((uint64_t*)p));
p += sizeof(uint64_t);
break;
case DW_EH_PE_sdata2:
@@ -527,7 +527,7 @@ scan_eh_tab(scan_results& results, _Unwind_Action actions, bool native_exception
// Walk call-site table looking for range that
// includes current PC.
uint8_t callSiteEncoding = *lsda++;
- uint32_t callSiteTableLength = readULEB128(&lsda);
+ uint32_t callSiteTableLength = static_cast<uint32_t>(readULEB128(&lsda));
const uint8_t* callSiteTableStart = lsda;
const uint8_t* callSiteTableEnd = callSiteTableStart + callSiteTableLength;
const uint8_t* actionTableStart = callSiteTableEnd;
diff --git a/libcxxabi/src/fallback_malloc.ipp b/libcxxabi/src/fallback_malloc.ipp
index ec75e8888661..e04fb1589a30 100644
--- a/libcxxabi/src/fallback_malloc.ipp
+++ b/libcxxabi/src/fallback_malloc.ipp
@@ -54,7 +54,7 @@ heap_node *node_from_offset ( const heap_offset offset )
{ return (heap_node *) ( heap + ( offset * sizeof (heap_node))); }
heap_offset offset_from_node ( const heap_node *ptr )
- { return static_cast<size_t>(((char *) ptr ) - heap) / sizeof (heap_node); }
+ { return static_cast<heap_offset>(static_cast<size_t>(((char *) ptr ) - heap) / sizeof (heap_node)); }
void init_heap () {
freelist = (heap_node *) heap;
@@ -87,7 +87,7 @@ void *fallback_malloc(size_t len) {
p->len -= nelems;
q = p + p->len;
q->next_node = 0;
- q->len = nelems;
+ q->len = static_cast<heap_size>(nelems);
return (void *) (q + 1);
}