Use a std::string rather than a dynamically allocated char* buffer.
authorBenjamin Kramer <benny.kra@googlemail.com>
Mon, 24 Dec 2012 19:23:30 +0000 (19:23 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Mon, 24 Dec 2012 19:23:30 +0000 (19:23 +0000)
commit791dbb3e5fbe5910b84e3f2bd26cf272e2bde128
treefa4196a1a5a3de3f79c47b2825601fc97581e4bb
parenta0be09f511c68a88ee95b73c8f0ebd78156a559e
Use a std::string rather than a dynamically allocated char* buffer.

This affords us to use std::string's allocation routines and use the destructor
for the memory management. Switching to that also means that we can use
operator==(const std::string&, const char *) to perform the string comparison
rather than resorting to libc functionality (i.e. strcmp).

Patch by Saleem Abdulrasool!

Differential Revision: http://llvm-reviews.chandlerc.com/D230

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171042 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMConstantPoolValue.cpp
lib/Target/ARM/ARMConstantPoolValue.h