[llvm] r174332 - Replace global std::string with const char[]

Alexey Samsonov samsonov at google.com
Mon Feb 4 07:55:26 PST 2013


Author: samsonov
Date: Mon Feb  4 09:55:26 2013
New Revision: 174332

URL: http://llvm.org/viewvc/llvm-project?rev=174332&view=rev
Log:
Replace global std::string with const char[]

Modified:
    llvm/trunk/tools/llvm-symbolizer/LLVMSymbolize.cpp
    llvm/trunk/tools/llvm-symbolizer/LLVMSymbolize.h

Modified: llvm/trunk/tools/llvm-symbolizer/LLVMSymbolize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-symbolizer/LLVMSymbolize.cpp?rev=174332&r1=174331&r2=174332&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-symbolizer/LLVMSymbolize.cpp (original)
+++ llvm/trunk/tools/llvm-symbolizer/LLVMSymbolize.cpp Mon Feb  4 09:55:26 2013
@@ -132,7 +132,7 @@ bool ModuleInfo::getNameFromSymbolTable(
   return false;
 }
 
-const std::string LLVMSymbolizer::kBadString = "??";
+const char LLVMSymbolizer::kBadString[] = "??";
 
 std::string LLVMSymbolizer::symbolizeCode(const std::string &ModuleName,
                                           uint64_t ModuleOffset) {

Modified: llvm/trunk/tools/llvm-symbolizer/LLVMSymbolize.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-symbolizer/LLVMSymbolize.h?rev=174332&r1=174331&r2=174332&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-symbolizer/LLVMSymbolize.h (original)
+++ llvm/trunk/tools/llvm-symbolizer/LLVMSymbolize.h Mon Feb  4 09:55:26 2013
@@ -59,7 +59,7 @@ private:
   typedef std::map<std::string, ModuleInfo*> ModuleMapTy;
   ModuleMapTy Modules;
   Options Opts;
-  static const std::string kBadString;
+  static const char kBadString[];
 };
 
 class ModuleInfo {





More information about the llvm-commits mailing list