[llvm] r185322 - llvm-symbolizer: Recognize a drive letter on win32. Then "REQUIRES: shell" can be removed.
NAKAMURA Takumi
geek4civic at gmail.com
Mon Jul 1 02:51:42 PDT 2013
Author: chapuni
Date: Mon Jul 1 04:51:42 2013
New Revision: 185322
URL: http://llvm.org/viewvc/llvm-project?rev=185322&view=rev
Log:
llvm-symbolizer: Recognize a drive letter on win32. Then "REQUIRES: shell" can be removed.
FIXME: Could we use llvm::sys::Path here?
Modified:
llvm/trunk/test/DebugInfo/llvm-symbolizer.test
llvm/trunk/tools/llvm-symbolizer/LLVMSymbolize.cpp
Modified: llvm/trunk/test/DebugInfo/llvm-symbolizer.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/llvm-symbolizer.test?rev=185322&r1=185321&r2=185322&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/llvm-symbolizer.test (original)
+++ llvm/trunk/test/DebugInfo/llvm-symbolizer.test Mon Jul 1 04:51:42 2013
@@ -10,8 +10,6 @@ RUN: echo "%p/Inputs/macho-universal:x86
RUN: llvm-symbolizer --functions --inlining --demangle=false \
RUN: --default-arch=i386 < %t.input | FileCheck %s
-REQUIRES: shell
-
CHECK: main
CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:16
Modified: llvm/trunk/tools/llvm-symbolizer/LLVMSymbolize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-symbolizer/LLVMSymbolize.cpp?rev=185322&r1=185321&r2=185322&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-symbolizer/LLVMSymbolize.cpp (original)
+++ llvm/trunk/tools/llvm-symbolizer/LLVMSymbolize.cpp Mon Jul 1 04:51:42 2013
@@ -279,6 +279,11 @@ LLVMSymbolizer::getOrCreateModuleInfo(co
std::string BinaryName = ModuleName;
std::string ArchName = Opts.DefaultArch;
size_t ColonPos = ModuleName.find(':');
+#if defined(_WIN32)
+ // Recognize a drive letter on win32.
+ if (ColonPos == 1 && isalpha(ModuleName[0]))
+ ColonPos = ModuleName.find(':', 2);
+#endif
if (ColonPos != std::string::npos) {
BinaryName = ModuleName.substr(0, ColonPos);
ArchName = ModuleName.substr(ColonPos + 1);
More information about the llvm-commits
mailing list