]> granicus.if.org Git - llvm/commitdiff
Change the type of Undecorated to unique_ptr<char[]> since we're looking at a null...
authorEric Christopher <echristo@gmail.com>
Fri, 30 Jun 2017 01:45:56 +0000 (01:45 +0000)
committerEric Christopher <echristo@gmail.com>
Fri, 30 Jun 2017 01:45:56 +0000 (01:45 +0000)
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

tools/llvm-nm/llvm-nm.cpp

index 29836da1fcd76c6707479011c938a937f0fb3323..b25c4775e8d8d8bdc04aa952c876aa48dc15321e 100644 (file)
@@ -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;