forked from OSchip/llvm-project
llvm-symbolizer: Recognize a drive letter on win32. Then "REQUIRES: shell" can be removed.
FIXME: Could we use llvm::sys::Path here? llvm-svn: 185322
This commit is contained in:
parent
bafa6b711a
commit
234acdfdc8
|
@ -10,8 +10,6 @@ RUN: echo "%p/Inputs/macho-universal:x86_64 0x100000f05" >> %t.input
|
||||||
RUN: llvm-symbolizer --functions --inlining --demangle=false \
|
RUN: llvm-symbolizer --functions --inlining --demangle=false \
|
||||||
RUN: --default-arch=i386 < %t.input | FileCheck %s
|
RUN: --default-arch=i386 < %t.input | FileCheck %s
|
||||||
|
|
||||||
REQUIRES: shell
|
|
||||||
|
|
||||||
CHECK: main
|
CHECK: main
|
||||||
CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:16
|
CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:16
|
||||||
|
|
||||||
|
|
|
@ -279,6 +279,11 @@ LLVMSymbolizer::getOrCreateModuleInfo(const std::string &ModuleName) {
|
||||||
std::string BinaryName = ModuleName;
|
std::string BinaryName = ModuleName;
|
||||||
std::string ArchName = Opts.DefaultArch;
|
std::string ArchName = Opts.DefaultArch;
|
||||||
size_t ColonPos = ModuleName.find(':');
|
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) {
|
if (ColonPos != std::string::npos) {
|
||||||
BinaryName = ModuleName.substr(0, ColonPos);
|
BinaryName = ModuleName.substr(0, ColonPos);
|
||||||
ArchName = ModuleName.substr(ColonPos + 1);
|
ArchName = ModuleName.substr(ColonPos + 1);
|
||||||
|
|
Loading…
Reference in New Issue