summaryrefslogtreecommitdiff
path: root/tools/llvm-nm
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2017-06-30 01:45:56 +0000
committerEric Christopher <echristo@gmail.com>2017-06-30 01:45:56 +0000
commit47b2ec11a193f96a66ab1f698352daaf8e143ccd (patch)
tree22bbdd876bbc8f37f12bd1c1aa250a194317845e /tools/llvm-nm
parentf89749b21f54a1a84f780c0e51884bf1fca3320e (diff)
Change the type of Undecorated to unique_ptr<char[]> since we're looking at a null terminated string and not a single character.
Fixes an error in tcmalloc sized delete checking. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306780 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-nm')
-rw-r--r--tools/llvm-nm/llvm-nm.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/llvm-nm/llvm-nm.cpp b/tools/llvm-nm/llvm-nm.cpp
index 29836da1fcd..b25c4775e8d 100644
--- a/tools/llvm-nm/llvm-nm.cpp
+++ b/tools/llvm-nm/llvm-nm.cpp
@@ -672,7 +672,7 @@ static Optional<std::string> demangle(StringRef Name, bool StripUnderscore) {
return None;
int Status;
- std::unique_ptr<char> Undecorated(
+ std::unique_ptr<char[]> Undecorated(
itaniumDemangle(Name.str().c_str(), nullptr, nullptr, &Status));
if (Status != 0)
return None;